Stateli React
A React library to enable Stateli to work with React and Redux Dev Tools.
Installation
Install stateli-react with npm.
$ npm install stateli stateli-react --save
Usage
// in React main component
import React from 'react';
import { StateliStore } from 'stateli';
import { StateliProvider } from 'stateli-react';
import App from './App.jsx'; // <-- your React app component
const store = new StateliStore({
actions: [],
mutations: [],
getters: [],
state: {},
});
export default class MainComponent extends React.Component {
render() {
return (
<div>
<StateliProvider store={store}>
<App />
</StateliProvider>
</div>
);
}
}