Skip to content

Crash with v14.3.3 and newer with Gatsby #667

Open
@tu4mo

Description

@tu4mo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions