Skip to content

Commit 9c383a9

Browse files
committed
Fix missing typings (temporary fix) by casting to any
1 parent 8fbd4e9 commit 9c383a9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/browser.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ fetch(propsUrl)
88
.then((props: AppProps) => {
99
const app = (<App {...props} />);
1010
const el = document.getElementById(containerId);
11-
const hydrate = ReactDOM.hydrate as any;
12-
hydrate(app, el);
11+
const dom = ReactDOM as any;
12+
dom.hydrate(app, el);
1313
});

src/server.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ createServer(async (req, res) => {
3333
<body>
3434
<div id="${containerId}">`);
3535
const props: AppProps = { items: getItems() };
36-
const renderToNodeStream = ReactDomServer.renderToNodeStream as any;
37-
const stream = renderToNodeStream(App(props)) as any;
36+
const domserver = ReactDomServer as any;
37+
const stream = domserver.renderToNodeStream(App(props));
3838
stream.pipe(res, { end: false });
3939
stream.on('end', () => {
4040
res.end(`</div>

0 commit comments

Comments
 (0)