3 ms·
From my point of view, a lot of trouble could be saved if it were a priority in browser development to reduce the number of libraries and layers necessary to bu
by jwells89 3y ago
From my point of view, a lot of trouble could be saved if it were a priority in browser development to reduce the number of libraries and layers necessary to build things like SPAs.
There’s been a lot of movement in this direction for CSS which is great, but it needs to happen in HTML and JavaScript too. Just a few cycles of implementing popular libraries as base browser functionality and adding better widget primitives would do wonders to reduce complexity and bloat.
- HumblyTossed 3y ago> if it were a priority in browser development to reduce the number of libraries and layers necessary to build things like SPAs. But this is the antithesis of FE culture. When FE culture spun up there was a lot of mocking of javascript devs as not "real" devs. I think they felt the need to reinvent CS so that they could show they were legitimate. They never really recovered from that.
- jacobsimon 3y agoAgreed. I’ll take a more controversial stance that I’ve said here before: CSS/HTML are part of the problem and the community should have invested in proper UI/rendering frameworks a long time ago that weren’t designed around the quirks of HTML and CSS. Building an accessible canvas-based UI with a React-like API would make a lot more sense for SPAs, and maybe other types of websites too.
- stevenpetryk 3y agoCanvas is a blank slate to screen readers though.
- jacobsimon 3y agoYeah that’s what I meant by accessible, agree it’s a problem today
- egeozcan 3y ago> Building an accessible canvas-based UI with a React-like API would make a lot more sense for SPAs https://github.com/Flipboard/react-canvas https://github.com/Flipboard/react-canvas React is the Simpsons of web tech (Referring to the "Simpsons did it meme" if that wasn't clear).
- jacobsimon 3y agoThanks this is really close to what I was imagining, but looks like it’s been inactive for a long time.
- egeozcan 3y agoYes, the reactions to it were not very enthusiastic as you'd expect. Also it did have a11y issues. There are a lot of interesting renderers for react, some of them are even maintained: https://github.com/chentsulin/awesome-react-renderer https://github.com/chentsulin/awesome-react-renderer
- akira2501 3y agoYou have the history state API and Custom Elements. Are these not adequate?
- jwells89 3y agoNot really. These APIs are useful, but they’re still too primitive to make a dent in library usage. To do that you need things like highly capable “batteries included” (yet easily customizable) widgets and the more generally applicable parts of React (or similar) implemented as browser APIs, so for the majority use case few or no third party libraries or layers are necessary. The end goal here would be to have a basic reactive UI development toolkit complete with a full spread of ready to use widgets with nothing but a plain text editor and a browser. That won’t meet everybody’s needs of course, but even those still using third party libs would benefit since things like React could be lightweight “sugar” libraries built on the browser APIs instead of hulking behemoths with a fractal spiral of dependencies.