3 ms·
You are not wrong, I think renderprops are valid, and I still use them in some situations. They are imo not ideal as they are hard to memoize because of the re
by codeptualize 4y ago
You are not wrong, I think renderprops are valid, and I still use them in some situations.
They are imo not ideal as they are hard to memoize because of the render function. It’s funny that if you try to memoize renderprop components you likely have to use some sort of inputs array just like hooks.
Besides the memoization issue it also gets pretty messy if you need to implement many of them. Instead of just putting things in variables you are now nesting many levels deep.
I think renderprops and hooks are functionally not that different, but hooks have better ergonomics when using many.