react-jet

    1.1.3 • Public • Published

    react-jet

    Replace redux and react context

    NPM

    install size dependencies

    Version License Downloads

    install

    npm install react-jet
    

    use

    Initial state

    import { initial } from 'react-jet';
    
    initial([
      {
        name: 'time',
        defaultValue: 2018
      }
    ]);

    Connect to components

    import React from 'react';
    import { connect } from 'react-jet';
    
    function DisplayTime(props) {
      return <div>{props.time}</div>;
    }
    
    export default connect(
      DisplayTime,
      ['time']
    );

    Change state

    import { state } from 'react-jet';
    
    state.time = 2019;

    Keywords

    none

    Install

    npm i react-jet

    DownloadsWeekly Downloads

    3

    Version

    1.1.3

    License

    ISC

    Unpacked Size

    8.37 kB

    Total Files

    4

    Last publish

    Collaborators

    • itten