Skip to content

Instantly share code, notes, and snippets.

@VinixGonzalez
Created November 24, 2019 03:12
Show Gist options
  • Save VinixGonzalez/8a1b7a424cdf6db674166c4e13171565 to your computer and use it in GitHub Desktop.
Save VinixGonzalez/8a1b7a424cdf6db674166c4e13171565 to your computer and use it in GitHub Desktop.
index.js da raiz da aplicação, configurado para receber a store do mobx
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { Provider } from 'mobx-react';
import RootStore from '../src/mobx/RootStore';
const Root = (
<Provider RootStore={RootStore}>
<App />
</Provider>
)
ReactDOM.render(Root, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment