Skip to content

pearlshare/dirty-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dirty React

With a large react app, your app.js might not be delivered immediately, which means you may accidentally overwrite changes that were made between the page load and the client-side render.

DirtyReact to the rescue!

DirtyReact records the value of input's and textarea's on the page, so once a client-side render has occured, then the information call all be placed back.

Usage

In your highest level component:

var dirtyReact = require("dirty-react");

...
    componentWillMount: function () {
        dirtyReact.watch();
    },

    componentDidMount: function () {
        dirtyReact.replay();
    }
...

And bam! Any data entered into your webpage wont be lost!

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors