Skip to content

Commit

Permalink
Merge pull request #10978 from fjorgemota/feature/preact-update
Browse files Browse the repository at this point in the history
Preact: Update Preact version
  • Loading branch information
shilman authored Jun 3, 2020
2 parents dfc9ee6 + a91de3f commit e1880cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"ts-dedent": "^1.1.1"
},
"devDependencies": {
"preact": "^8.4.2"
"preact": "^10.4.0"
},
"peerDependencies": {
"@babel/core": "*",
"preact": "^8.4.2",
"preact": "^10.0.0",
"react": "*",
"react-dom": "*"
},
Expand Down
5 changes: 2 additions & 3 deletions app/preact/src/client/preview/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { document } from 'global';
import dedent from 'ts-dedent';
import { RenderContext } from './types';

let renderedStory: Element;
const rootElement = document ? document.getElementById('root') : null;

export default function renderMain({ storyFn, kind, name, showMain, showError }: RenderContext) {
Expand All @@ -20,9 +19,9 @@ export default function renderMain({ storyFn, kind, name, showMain, showError }:
return;
}

render(null, rootElement, renderedStory);
render(null, rootElement);

showMain();

renderedStory = render(element, rootElement);
render(element, rootElement);
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25815,6 +25815,11 @@ preact-render-to-json@^3.6.6:
resolved "https://registry.yarnpkg.com/preact-render-to-json/-/preact-render-to-json-3.6.6.tgz#f67f48581912ac53fc9f4873bc6d7ce342f71c20"
integrity sha1-9n9IWBkSrFP8n0hzvG1840L3HCA=

preact@^10.4.0:
version "10.4.4"
resolved "https://registry.yarnpkg.com/preact/-/preact-10.4.4.tgz#0bd6d759ec2f8684aaf8c63c7f076191e46528cf"
integrity sha512-EaTJrerceyAPatQ+vfnadoopsMBZAOY7ak9ogVdUi5xbpR8SoHgtLryXnW+4mQOwt21icqoVR1brkU2dq7pEBA==

preact@^8.4.2:
version "8.5.3"
resolved "https://registry.yarnpkg.com/preact/-/preact-8.5.3.tgz#78c2a5562fcecb1fed1d0055fa4ac1e27bde17c1"
Expand Down

0 comments on commit e1880cc

Please sign in to comment.