Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

stateli-react

walts817MIT1.0.0TypeScript support: included

React library to enable Stateli to work with React and Redux dev tools

state, state management, react, redux

readme

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