5 ms·
Stateless function components are definitely super exciting (we had been faking this with just Component(function() { return .. }). I'm interested how it handle
by tolmasky 11y ago
Stateless function components are definitely super exciting (we had been faking this with just Component(function() { return .. }). I'm interested how it handles shouldComponentUpdate though. We do some interesting things in there to deal with cursors, etc, so it would be nice to be able to get into the standard shouldComponentUpdate.
- k__ 11y agoYes. The function components are awesome. I use Redux, where all the state tickles down through the props, so I can probably remove a huge chunk of boilerplate in my apps.
- Tankenstein 11y ago"I use Redux, where all the state tickles down through the props" Isn't that just flux, or even just good React practice?
- pluma 11y agoIt's good React practice, but it's not really Flux. A lot of Flux/Flux-inspired frameworks have components actively listen to global stores.
- dustingetz 11y ago> so it would be nice to be able to get into the standard shouldComponentUpdate Is there such thing? You at least need to choose between value and ref equality for various props? Also not clear to me if these functions are turned into full React components with lifecycle methods and async rendering, or are just synchronously invoked in the same render stack frame as the closest up-stack actual React component.