We want to expose the minimum amount of top-level modules possible, and at the same time want to map closely to the npm packages. So each module maps to a npm package, and each sub-module maps to a sub-module. For example: react-dom
-> ReactDOM
and react-dom/server
-> ReactDOMServer
.
Files overview:
React
: bindings to ReactReact.Event
: bindings to React's custom events systemReact.Context
: bindings to React's Context
ReactDOM
: bindings to ReactDOMReactDOM.Style
: bindings to createstyle
objects
ReactDOMServer
: bindings to ReactDOMServerReactDOMTestUtils
: helpers for testing your components
ReasonReactErrorBoundary
: component to catch errors within your component treeReasonReactRouter
: a simple, yet fully featured router with minimal memory allocations
Eventually ReasonReactErrorBoundary
and ReasonReactRouter
could live into their own packages, but for now they are part of ReasonReact (and we will keep them here for backwards compatibility).