react-mismatch
v0.1.1
Published
Check react diff for SSR
Downloads
3
Readme
react-mismatch
Check missmatch between Server Side Rendering and Client Side Rendering for React.
Good for PR
Install
npm install --save react-mismatch
or
yarn add react-mismatch
How to use
Desclimer: Don't use in PRODUCTION mode
import React from 'react';
import ReactDOM from 'react-dom';
import mismatch from 'react-mismatch';
import App from './App';
const appNode = document.querySelector('app');
const mismatchCallback = mismatch(appNode);
ReactDOM.hydrate(<App />, appNode, mismatchCallback);
In future:
- [ ] More examples
- [ ] Colored diff
- [ ] More informative diff
- [ ] Unit tests
- [ ] Minification and polyfill