3 ms·
+1 on the render prop style HOC. Wish I had the time to write an example, but a good one is React Router's withRouter HOC [0]. I've used this a ton and it works
by leetbulb 9y ago
+1 on the render prop style HOC. Wish I had the time to write an example, but a good one is React Router's withRouter HOC [0]. I've used this a ton and it works extremely well.
[0] https://github.com/ReactTraining/react-router/blob/master/packages/react-router/modules/withRouter.js https://github.com/ReactTraining/react-router/blob/master/pa...