26 ms·
This seems quite complicated. Rarely the big perf hit is in js. The big perf hit is usually layout, composite and paint cycles. They are eons slower than manipu
by nojvek 7y ago
This seems quite complicated. Rarely the big perf hit is in js. The big perf hit is usually layout, composite and paint cycles. They are eons slower than manipulating a virtual dom tree in js.
So I don’t get it. You can’t interrupt the browsers native paint cycle. Once you say node.appendChild or change some attr/style. The browsers gonna do what the browsers gonna do.
React was simple. With hooks , concurrent mode, virtual events and mumbo jumbo. I don’t get it anymore. It’s not a lean mean library that takes minutes to run and one can’t read the source in a couple of hours
- countryqt30 7y agoWe switched to vueJS and never regretted :)
- james_s_tayler 7y ago>React was simple. With hooks , concurrent mode, virtual events and mumbo jumbo. I don’t get it anymore. It’s not a lean mean library that takes minutes to run and one can’t read the source in a couple of hours I feel that. One of the top voted questions was "how do I do a simple form submission?" and the response was "it all depends on your state management caching behavior". I think that highlights just how beginner unfriendly some of this stuff has become.
- latchkey 7y agoI ran into that myself while working on a form heavy project. You can use various react form libraries to help make things easier, but then you need to figure out how to wrap your favorite visual component library. Passing all the properties between the two is really really confusing. I'm a fan of the Material-UI project which provides the visual components and ability to style them however you want. React Final Form is terrific with managing forms (and easily made very performant). imho, these form components become really nice to work with... Demo: https://lookfirst.github.io/mui-rff/ https://lookfirst.github.io/mui-rff/ Codesandbox: https://codesandbox.io/s/react-final-form-material-ui-example-tqv09 https://codesandbox.io/s/react-final-form-material-ui-exampl... Code: https://github.com/lookfirst/mui-rff https://github.com/lookfirst/mui-rff
- JMTQp8lwXL 7y ago> the response was "it all depends on your state management caching behavior". I think that highlights just how beginner unfriendly some of this stuff has become. What's the alternative? In Angular, the whole problem would've been solved with their template engine + built-in forms module. But Angular has a huge API surface. With React, you have your template engine. Form state can be managed with a third-party library, like final form. It's no broader of an API Surface than Angular would be. So the question is, when were these things ever "beginner friendly"? Were forms easier 5, 10 years ago than they are to implement today?
- james_s_tayler 7y ago>Were forms easier 5, 10 years ago than they are to implement today? Yes. Less was expected of us. Things have grown and evolved in such a way that user interfaces can provide much better experiences than they use to be able to and as the capabilities have grown, so have the expectations. Along with it the barrier to entry has gone up.
- pcr910303 7y ago> Rarely the big perf hit is in js. The big perf hit is usually layout, composite and paint cycles. You can’t interrupt the browsers native paint cycle. Yes, so that's why DOM manipulation is slow. And this change basically allows you to not do DOM manipulation on every tick. > The browsers gonna do what the browsers gonna do. The browsers gonna do what the JS code tells what the browsers should do. > React was simple. And that was insufficient. > I don’t get it anymore. Then you should be looking at hypersrcipt or preact or something else. Nobody is forcing React to you.
- mda 7y ago"Nobody is forcing" is never a good answer. If gp is a react developer, his feedback and feeling about the framework matters.