rehace
React-Habitat-Cerebral: Components for HTML
Connects React-Habitat components to a single Cerebral controller.
Basic Usage
You can find a simple demo using the Counter example from the cerebral sitein the /demo folder of this repo. See the working example at https://burning-duck.github.io/rehace/.
The main difference is, that you don't render your root Components into the page. Just register them in an React-Habitat container for later use.
ReHaCe wraps each registered component in an Cerebral container using controller instance you passed in. This allows each component to connect to the same state.
index.js
// This is the Cerebral controller // Components to register const app =
In your HTML file you can use React-Habitat syntax to use the components.
index.html
The current count is . You can increase the counter: . You can descrease the counter: .