Skip to content

Commit

Permalink
make parcel example more fragile to #1268
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Jun 30, 2019
1 parent 70353e5 commit 3cb9c64
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/parcel/package.json
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"license": "MIT",
"scripts": {
"start": "parcel index.html",
"start": "parcel index.html --no-cache",
"start:prod": "parcel build index.html",
"start:link": "cp -R ../../dist ./node_modules/react-hot-loader && cp -R ../../*.js ./node_modules/react-hot-loader"
},
Expand Down
16 changes: 10 additions & 6 deletions examples/parcel/src/App.js
@@ -1,12 +1,16 @@
import React from 'react';
import { hot } from 'react-hot-loader';
import Counter from './Counter';
import { Problem } from './Problem';

const App = () => (
<h1>
Hello, world.<br />
<Counter />
</h1>
);
const App = () => {
return (
<h1>
<Problem />
Hello, world<br />
<Counter />
</h1>
);
};

export default hot(module)(App);
7 changes: 7 additions & 0 deletions examples/parcel/src/Problem.js
@@ -0,0 +1,7 @@
import React from 'react';
import { useExternalHook } from './Counter';

export function Problem() {
useExternalHook();
return <div>the problem!!!!</div>;
}

0 comments on commit 3cb9c64

Please sign in to comment.