All Projects → coot → purescript-isomorphic-react-example

coot / purescript-isomorphic-react-example

Licence: MIT license
Example of Isomorphic React Application written in PureScript

Programming Languages

purescript
368 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Example of Isomorphic React Application written in PureScript

It's using cofree-react-router for routing, the server is written using the hyper library.

In the frontend app the top most component rendered as:

createElement browserRouterClass {router, notFound: Nothing} []

where browserRouterClass comes from cofree-react-router, on the backend we can render the app using:

runRouter url router

since this is how browserRouterClass renders (with exception of routes that where not found). This is fine for react since it compares the html content (using a modified version of adler32, if you wish to check the react code it is here ).

State

The state is manged by purescript-redox which is similar to redux, but the dsl - interpreter pair is a free monad paired with cofree comonad rather than redux actions with redux reducer.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].