3 ms·
Not to discount your experience, which is pretty consistent with my own, but what you've just described is writing your own wrapper component. I think there's
by smrq 9y ago
Not to discount your experience, which is pretty consistent with my own, but what you've just described is writing your own wrapper component.
I think there's something to be said for doing it yourself, particularly when the available options make you have to care about their internals anyway. But perhaps some of that effort might be put towards making a better open-source wrapper.
- mhink 9y agoI've worked a little bit with libraries like this (react-mapbox-gl) and I think the point GP is making is more like this: <3P.Wrapper> <3P.Foo> <3P.Bar subcomponent={props} /> </3P.Foo> { someCondition ? <3P.Quux onCrunch={doQuack}{ /> } </3P.Wrapper> where mounting and unmounting those child components interacts with the wrapped API. Contrast that with <3P.BasicWrapper useFoo useBar useQuux={someCondition} onQuuxCrunch={doQuack} /> which is less suitable for generic use, but easy enough to write (and modify later) that you probably don't need a highly-generic wrapper.
- k__ 9y agoThere is a difference between creating one component as entry to the lib and using React for the whole state management.