3 ms·
Because the way React or Vue render and update things is very different from the vanilla JS approach. What if I want, let's say, tooltip contents to be bound to
by bufferoverflow 3y ago
Because the way React or Vue render and update things is very different from the vanilla JS approach. What if I want, let's say, tooltip contents to be bound to some state. Your JS implementation has no idea about the state. At best, you will provide a function to update tooltip contents.
- Philip-J-Fry 3y agoYou can write it in vanilla JS and then offer framework specific wrappers. A function to update the contents of a tooltip is probably to do it in vanilla JS. Then in your react wrapper you can tie this to a component property or something.
- impulser_ 3y agoWe use a component library written in pure JS in React apps and it works perfectly fine. JS + HTML is more powerful than you think.