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

Crash with v14.3.3 and newer with Gatsby #667

Open
tu4mo opened this issue Nov 4, 2021 · 0 comments
Open

Crash with v14.3.3 and newer with Gatsby #667

tu4mo opened this issue Nov 4, 2021 · 0 comments

Comments

@tu4mo
Copy link

tu4mo commented Nov 4, 2021

I'm having a weird issue with react-element-to-jsx-string and Gatsby with the latest version.

This will crash the browser with 14.3.4, but works in 14.3.2.

Only happens inside Gatsby page in develop mode. Any ideas?

import React from 'react'
import reactElementToJSXString from 'react-element-to-jsx-string'

const Foo = () => <div foo={{ foo: <Foo /> }}>Hello</div>
//                                 ^- causes the crash

const Page = () => <>{reactElementToJSXString(Foo())}</>

export default Page

Reproduction: https://github.com/tu4mo/gatsby-retjs-issue

@tu4mo tu4mo changed the title Crash with v14.3.4 and Gatsby Crash with v14.3.3 and newer with Gatsby Nov 8, 2021
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

1 participant