Search code examples
fetchreasonreason-react

Fetching data from API for ReasonReact app


I'm learning ReasonReact and I would like to fetch data from a API, that I'm going to use on my component. However, on the official website about Reason or ReasonReact there's nothing about this, neither I found something searching on Google. How can I do it?


Solution

  • You can use the existing bindings to HTTP client libraries, e.g.:

    The former works in browser only, the latter works in both browser and Node.

    In general, if you're looking for a way to do something, Redex is a great place to look.