Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kimjuny opened this issue Aug 7, 2017 · 3 comments
Open

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

kimjuny opened this issue Aug 7, 2017 · 3 comments

Comments

@kimjuny
Copy link

kimjuny commented Aug 7, 2017

[email protected]

[email protected] ~ 1.5.0

Has this problem been solved? #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
Copy link
Author

kimjuny commented Aug 7, 2017

Never mind, this works.

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

@kimjuny kimjuny closed this as completed Aug 7, 2017
@rubenw
Copy link

rubenw commented Nov 6, 2017

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])

@kimjuny kimjuny reopened this Nov 6, 2017
@matteocng
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants