There's a brief section on getting started below. For a more complete guide, check out the React Basic
docs! (work in progress) (sorry, not sure when the docs will be done but here's a "real world" example app which is a great starting point! jonasbuntinx/purescript-react-realworld -- I also recommend the PureScript Discourse forum for specific questions, and am usually fairly responsive to blocking issues here on GitHub, including the repositories below. Finally, check out the purescript-cookbook repo for small examples of specific use cases, like
This library contains the core types and tools used by the rest of the React Basic ecosystem. To use React Basic in your applications you'll also need to choose one or more implementations as well as a target environment!
Note: The Hooks and Classic implementations can both be used in the same project
- PureScript types for building components using React hooks, as well as creating custom hooks.
react-basic-classic(this implementation was previously included in the
- PureScript types for the more traditional class-based React API. Very similar to the Reason-React API.
For example, to use the
react-basic hooks implementation for web development in a
npm i -S react react-dom spago install react-basic react-basic-dom react-basic-hooks
npm i -S react react-dom bower i -S purescript-react-basic purescript-react-basic-dom purescript-react-basic-hooks
React.Basic.DOM modules have been moved to
react-basic-dom. This doesn't require any code changes, but you will need to add this dependency to your projects.
The component implementation previously in
React.Basic has been extracted to
react-basic-classic, which now provides the
React.Basic.Classic module. Just install that library and find/replace
If you were using the
React.Basic.Compat module, that module has been moved to
If you were using
react-basic-hooks exclusively everything should work as-is.
Because this library no longer contains a specific implementation and the example structure contained a fair bit of boilerplate, they've been removed in favor of a consolidated documentation site (linked above). This is still a work in progress but you can refer to the v14 examples in the meantime.