Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
refactor: separate index to react and sw providers
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Sep 30, 2018
1 parent 4dc4eae commit 838e25c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';

ReactDOM.render(<App />, 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: http://bit.ly/CRA-PWA
serviceWorker.unregister();
import './providers/react';
import './providers/service-worker';
6 changes: 6 additions & 0 deletions src/providers/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { render } from 'react-dom';
import '../index.css';
import App from '../App';

render(<App />, document.getElementById('root'));
6 changes: 6 additions & 0 deletions src/providers/service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as serviceWorker from '../serviceWorker';

// 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: http://bit.ly/CRA-PWA
serviceWorker.unregister();

0 comments on commit 838e25c

Please sign in to comment.