Core: Update Preact version

This commit is contained in:
Fernando Jorge Mota 2020-05-29 03:11:51 -03:00
parent a38451fdda
commit 942dda2e70
3 changed files with 9 additions and 5 deletions

View File

@ -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.4.0",
"react": "*",
"react-dom": "*"
},

View File

@ -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) {
@ -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);
}

View File

@ -25794,6 +25794,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"