new Fluxex(stateopt)
Fluxex object is an isomorphic application
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
state |
Object |
<optional> |
Serialized Fluxex application state |
- Source:
Extends
Methods
(static) createApp(stores, HtmlJsx, mixinsopt) → {Object}
Create an fluxex application by provided defintion.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
stores |
Object | Store defination as {storeName: implement} pairs | |
HtmlJsx |
React | The Html element defined as a React component | |
mixins |
Object |
<optional> |
Extra methods/properties want to be merged into application prototype |
Returns:
The created fluxex application instance
- Type
- Object
Example
var myApp = require('fluxex').createApp({
product: require('./stores/product') // Define a 'product' store
}, process.cwd() + '/components/Html.jsx'); // Your Html.jsx