Re:Build Your Own React
by interlocutor on Thursday November 14, 2019 @06:26PM
(#21540666)
'render' should render, because that's what the function name says. If you're using it for behavior then you're not using it for the intended purpose.
[ Parent
| on HN ]
Re:Build Your Own React
by thatswrong0 on Thursday November 14, 2019 @06:56PM
(#21540916)
Now that hooks exist, this should definitely be the case. Before, HoCs / components with render prop functions were actually useful for doing some additional not-directly-render related work.
You can now use hooks for some things you might previously want a component for, e.g. useFetch instead of <Fetch />, but don't agree "this should definitely be the case". Dogma is never good.