Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Add instructions on using next-urql with ReasonML. #28

Merged
merged 1 commit into from
Jan 26, 2020

Conversation

parkerziegler
Copy link
Contributor

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 of next-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's ctx object, a full type-safe binding of something like the IncomingRequest interface is beyond the scope of what we should support.

cc/ @dangdennis do you feel like this would give you enough to get started?

@parkerziegler parkerziegler requested a review from 0xRAG January 25, 2020 19:57
@dangdennis
Copy link

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!

@parkerziegler
Copy link
Contributor Author

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 😕

@parkerziegler parkerziegler merged commit 32580de into master Jan 26, 2020
@parkerziegler parkerziegler deleted the task/add-instructions-on-reasonml-usage branch January 26, 2020 18:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Official ReasonML binding
2 participants