redbox-react icon indicating copy to clipboard operation
redbox-react copied to clipboard

[SSR] renderToString returns <!-- react-empty: 1 -->

Open kimjuny opened this issue 7 years ago • 3 comments

[email protected]

[email protected] ~ 1.5.0

Has this problem been solved? https://github.com/commissure/redbox-react/pull/99 I've tried [email protected] ~ 1.5.0, ssr always returns <!-- react-empty: 1 -->

const RedBox = require('redbox-react').default;
content = renderToString(<RedBox error={new Error()} />);
console.log(content); // <!-- react-empty: 1 -->

kimjuny avatar Aug 07 '17 01:08 kimjuny

Never mind, this works.

const RedBox = require('redbox-react').RedBoxError;
content = renderToString(<RedBox error={e} />);

kimjuny avatar Aug 07 '17 01:08 kimjuny

Could we re-open this? I'd like to use the default module instead of the actual redbox component. Right now, I'm ending up with an empty content string ([email protected] and [email protected])

rubenw avatar Nov 06 '17 10:11 rubenw

Confirmed empty content string ([email protected] and [email protected]) with @kimjuny's first example, and that the second example is working.

matteocng avatar Dec 12 '17 11:12 matteocng