Use a Render Prop
cdb.reacttraining.com
Use a Render Prop
1–10 of 35 posts
Re: Use a Render Prop
#2Re: Use a Render Prop
#3Neat! Didn't know about this concept. Any more examples of this being used somewhere?
Re: Use a Render Prop
#4Neat! Didn't know about this concept. Any more examples of this being used somewhere?
Re: Use a Render Prop
#5Re: Use a Render Prop
#6Could Redux boilerplate be reduced?
Re: Use a Render Prop
#7Even using the term "higher order" that seems like a very OOP solution, while render props is very functional and thus a better idiom for JavaScript.
Re: Use a Render Prop
#8Re: Use a Render Prop
#9What would the code look like to use this approach for Redux. Could Redux boilerplate be reduced?
First, could you clarify what _you_ mean by "Redux boilerplate" in this case? The phrase gets thrown around frequently, but it means different things to different people. Just yesterday, I tweeted some thoughts on how you can use as much abstraction as you want with Redux, and linked to examples of reusable action creator/reducer logic [0]. I also wrote a pair of blog posts that discuss the intent behind Redux's design [1], and why common usage patterns exist [2].
It's worth noting that React-Redux was originally written using a "render props"-type approach, but was changed to be a Higher-Order Component before it hit 1.0. In fact, there was a thread a month ago that discussed render props-based reimplementations of `connect` [3], and in that thread I linked to several recent examples of people reinventing that wheel as well as prior discussion of why React-Redux wound up as a HOC.
Finally, earlier this year I opened up an issue to discuss ways that we can improve both the "getting started" experience for Redux users, as well as build more powerful abstractions on top of Redux [4]. I'd love more feedback and ideas (and ideally people from the community volunteering to help us make things better).
[0] https://twitter.com/acemarke/status/928453589739155456
[1] http://blog.isquaredsoftware.com/2017/05/idiomatic-redux-tao...
[2] http://blog.isquaredsoftware.com/2017/05/idiomatic-redux-tao...
Re: Use a Render Prop
#10Neat! Didn't know about this concept. Any more examples of this being used somewhere?