Skip to main content
As talked in streaming entrypoints RΞASON, by default, applies a custom encoding to your data.
The custom encoding is only applied you yield objects in a streaming entrypoint.
This means that you need to decode your data in your client. And this is where the reason-decoder package comes in!

reason-decoder package

reason-decoder is a package for Javascript/Typescript that handles the decoding of your RΞASON’s streamed data.
If you are using React as your client, we recommend checking out our React library.
Here’s how to use it:
An example of using reason-decoder
Note that this does not handle making the HTTP request. reason-decoder only handles the decoding of the data.

A complete example

Here’s an example of how you could make a HTTP request to RΞASON and decode it:
An end-to-end example