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

Activity

changed the title [-]Crash with v14.3.4 and Gatsby[/-] [+]Crash with v14.3.3 and newer with Gatsby[/+] on Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @tu4mo

        Issue actions

          Crash with v14.3.3 and newer with Gatsby · Issue #667 · algolia/react-element-to-jsx-string