3 ms·
What's the problem with render props? You need a component to provide values to its unknown children, you either do render props or you need to clone the childr
by pmoleri 6y ago
What's the problem with render props? You need a component to provide values to its unknown children, you either do render props or you need to clone the children injecting them the values. I find render props to be a much more clear pattern than clone. It also works nicely in TypeScript doing the proper type checking.
Am I missing something?
Edit: I think I missed the point. Hooks do make providing state to children simpler in a lot of cases. I just don't hate render props that much :)