stateli-react
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i stateli-react

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

28.8 kB

Total Files

28

Last publish

Collaborators

  • walts81