Closed parkerziegler closed 4 years ago
This is definitely enough. Thanks a lot for the write up! Funny enough, it was hard just finding a simple example of binding HOCs.
Yours help!
Sweet, glad this could help! Yeah, it was a bit of a nightmare figuring out how this worked for a while, I wish there were some more formal documentation in ReasonReact on HoCs. They're still a relevant pattern in a lot of the React community, and trying to rework them into a render props style API doesn't always map cleanly 😕
Fix #12
This PR adds instructions on using
next-urql
with ReasonML. In my experience, maintaining separate bindings for libraries ends up being quite a time suck, especially as those libraries change over time. Moreover, I presume Reason users represent quite a small percentage ofnext-urql
users. For that reason, I think some light documentation on writing a thin Reason binding that users maintain themselves is the best approach. This also means they only need to bind the parts of the library that they actually use. Particularly with something like Next'sctx
object, a full type-safe binding of something like theIncomingRequest
interface is beyond the scope of what we should support.cc/ @dangdennis do you feel like this would give you enough to get started?