3

I am using renderToNodeStream in an SSR react application.

const markup = (
  <StyleSheetManager sheet={sheet.instance}>
    <Provider store={store}>
      <HelmetProvider context={helmetContext}>
        <StaticRouter context={context} location={req.url}>
          {renderRoutes(routes)}
        </StaticRouter>
      </HelmetProvider>
    </Provider>
  </StyleSheetManager>
);

class HtmlBody extends React.Component {
  ...  
  render() {
    return (<div id="app" dangerouslySetInnerHTML={{ __html: renderToNodeStream(props.markup) }} />);
  }
}

In the browser I get [Object] appearing on the screen for a split second - where is this coming from and how to stop it appearing?

JoeTidee
  • 24,754
  • 25
  • 104
  • 149

0 Answers0