4 ms·
Why are people tying their UI components to libraries? Why not just build it in pure JS and ship it with the app? We do it this way and it amazing because we c
by impulser_ 3y ago
Why are people tying their UI components to libraries? Why not just build it in pure JS and ship it with the app?
We do it this way and it amazing because we can use the same design across all of our apps no matter how they are built.
If a backend team wants to whip up a simple dashboard. They have components for it.
- deleted 3y ago[deleted]
- bufferoverflow 3y agoBecause 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.
- siquick 3y agoBecause accessibility isn’t as easy as it should be.