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

Call Stack Max Depth Fix when adding react components to global state in debug mode #726

Closed
PvanHengel opened this issue Nov 7, 2024 · 0 comments
Labels
bug Something isn't working emulator
Milestone

Comments

@PvanHengel
Copy link

As the global state grows, in particular if adding react components to it, the call stack can max out. There isnt really a need that I see to have react components in there at all, thus in this file:

https://github.com/smapiot/piral/blob/007e0558e140cf11ba91b5f30d991ed593c18b60/src/utilities/piral-debug-
utils/src/decycle.ts#L12

Could we add something along the lines of:

else if (value['$$typeof'] == Symbol.for('react.element')) {
      return "<react.element>"
}

I suppose we could get a little more fancy and put the signature of the component, name or something, but seems necessary at this point since it seems not many people have this issue.

@FlorianRappl FlorianRappl added this to the 1.7.2 milestone Nov 7, 2024
@FlorianRappl FlorianRappl added bug Something isn't working in-implementation The item is currently being implemented. emulator in-testing The item is already out in preview and can be tested. and removed in-implementation The item is currently being implemented. in-testing The item is already out in preview and can be tested. labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working emulator
Projects
None yet
Development

No branches or pull requests

2 participants