1.0.0 • Published 4 years ago

stateli-react v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Stateli React

Build Status Coverage Status

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>
    );
  }
}

License

MIT