Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/behnammodi/react-jet

combine jetstate and jetemit for react
https://github.com/behnammodi/react-jet

javascript react react-native

Last synced: about 1 month ago
JSON representation

combine jetstate and jetemit for react

Awesome Lists containing this project

README

        

# react-jet

Replace redux and react context

[![NPM](https://nodei.co/npm/react-jet.png)](https://nodei.co/npm/react-jet/)

[![install size](https://packagephobia.now.sh/badge?p=react-jet)](https://packagephobia.now.sh/result?p=react-jet) [![dependencies](https://david-dm.org/uxitten/react-jet.svg)](https://david-dm.org/uxitten/react-jet.svg)


Version


License


Downloads

# install

```npm
npm install react-jet
```

# use

## Initial state

```javascript
import { initial } from 'react-jet';

initial([
{
name: 'time',
defaultValue: 2018
}
]);
```

## Connect to components

```javascript
import React from 'react';
import { connect } from 'react-jet';

function DisplayTime(props) {
return

{props.time}
;
}

export default connect(
DisplayTime,
['time']
);
```

## Change state

```javascript
import { state } from 'react-jet';

state.time = 2019;
```