react-element-to-jsx-string icon indicating copy to clipboard operation
react-element-to-jsx-string copied to clipboard

Crash with v14.3.3 and newer with Gatsby

Open tu4mo opened this issue 4 years ago • 0 comments

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 avatar Nov 04 '21 15:11 tu4mo