All Projects → captainwz → React Pocket

captainwz / React Pocket

Licence: mit
A framework that enables you to use intimate jquery-style APIs in React instead of using redux. Light, simple and easy🍹

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Pocket

Vue Entity Adapter
Package to maintain entities in Vuex.
Stars: ✭ 20 (+81.82%)
Mutual labels:  state-management
Jquery Ezstorage
jQuery EZStorage Plugin: manages browser side storage of data
Stars: ✭ 7 (-36.36%)
Mutual labels:  jquery
Cz Parallax
Simple and tiny jQuery plugin for Parallax effect.
Stars: ✭ 10 (-9.09%)
Mutual labels:  jquery
Filemanager
An open-source file manager released under MIT license. Up-to-date for PHP connector. This package is DEPRECATED. Now, please use RichFileManager available at : https://github.com/servocoder/RichFilemanager.
Stars: ✭ 926 (+8318.18%)
Mutual labels:  jquery
Jquery Code Scanner
Lightweight handheld code scanner detector
Stars: ✭ 26 (+136.36%)
Mutual labels:  jquery
Metro Ui Css
Impressive component library for expressive web development! Build responsive projects on the web with the first front-end component library in Metro Style. And now there are even more opportunities every day!
Stars: ✭ 6,843 (+62109.09%)
Mutual labels:  jquery
Printthis
jQuery printing plugin; print specific elements on a page
Stars: ✭ 902 (+8100%)
Mutual labels:  jquery
Bootstrap Msg
The jQuery plugin for showing message with Bootstrap alert classes
Stars: ✭ 10 (-9.09%)
Mutual labels:  jquery
Codeigniter 3d Sanalpos
Codeigniter Tüm Bankalar İçin 3D Sanal Pos Entegrasyonu
Stars: ✭ 27 (+145.45%)
Mutual labels:  jquery
Mobius
A functional reactive framework for managing state evolution and side-effects.
Stars: ✭ 855 (+7672.73%)
Mutual labels:  state-management
Revuejs
🐇 A tiny, light and handy state management for vuejs 2, writing less verbose code.
Stars: ✭ 25 (+127.27%)
Mutual labels:  state-management
Ax5ui Uploader
jQuery file uploader, HTML5(IE9+, FF, Chrome, Safari) - http://ax5.io/ax5ui-uploader/
Stars: ✭ 25 (+127.27%)
Mutual labels:  jquery
Bloc
A predictable state management library that helps implement the BLoC design pattern
Stars: ✭ 8,214 (+74572.73%)
Mutual labels:  state-management
Redux Tree
An alternative way to compose Redux reducers
Stars: ✭ 23 (+109.09%)
Mutual labels:  state-management
Jquery.marquee
jQuery plugin to scroll the text like the old traditional marquee
Stars: ✭ 857 (+7690.91%)
Mutual labels:  jquery
Jquery Datetextentry
jQuery plugin providing a widget for date entry (not a date picker)
Stars: ✭ 19 (+72.73%)
Mutual labels:  jquery
Platform
Reactive libraries for Angular
Stars: ✭ 7,020 (+63718.18%)
Mutual labels:  state-management
Growi
⚓️ GROWI - Team collaboration software using markdown
Stars: ✭ 859 (+7709.09%)
Mutual labels:  jquery
Fileup
FileUp - JQuery File Upload
Stars: ✭ 10 (-9.09%)
Mutual labels:  jquery
Jquery Gridly
Gridly is a jQuery plugin to enable dragging and dropping as well as resizing on a grid.
Stars: ✭ 853 (+7654.55%)
Mutual labels:  jquery

react-pocket

npm version

A framework that helps you do state-management in React without redux or mobx. Light, simple and easy. Just write some intimate jquery-style codes like $('MyComponent').setProp({foo: 'bar'}) anywhere. That's enough!

Installation

npm install --save react-pocket

Quick Look

Let's take an example. There are three component files Card.js,Timer.js,Counter.js, which are aggregated to simply play a feature of counting. The following is the structure.

-- Card
    |
     -- Timer
          |
           -- Counter

What if you want to change the number of Counter just in Card.js. react-pocket offers you ability to do so! Here are the code examples.

/*Card.js*/

import $ from 'react-pocket';
import Timer from './Timer';

export default class Card extends $ {

    componentDidMount () {

        setInterval(() => {
            
            let num = parseInt($('Counter').getProp('num')) + 1;

            $('Counter').setProp({num});

        }, 1000);

    }

    return (
        <div>
            <Timer/>
        </div>
    )
}

/*Timer.js*/

import $ from 'react-pocket';
import Counter from './Counter';

export default class Timer extends $ {

    return (
        <div>
            <Counter/>
        </div>
    )
}
/*Counter.js*/

import $ from 'react-pocket';
export default class Counter extends $ {
    
    constructor (props) {
        super(props);
    }

    defaultProp () {
        
        return {
            num: 0
        }
    }

    render () {

        return (
            <h3>
                {this.props.num}
            </h3>
        )
    }
}

You can get the full example here.

gif

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].