-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Recursion error logging React children (with hooks) #19
Comments
Serializing logs with the current method is expensive, so when you call Internally, replicator is currently used to serialize objects (so they can be transferred between DOM's), those stack frames are from within it. The alternative way to handle recursion to use a two-way COM, which serializes objects as you expand them (the way chrome devtools does). I haven't done this, as I've previously managed to get chrome devtools working embedded on a website using a mocked version of the devtools websocket API - giving you the real devtools, but I haven't put much time into that. I don't currently have time to work on either, but pull requests are open |
You should be able to avoid the serializing / deserializing step, if the iframe is same-origin. |
In our own app (Framer) we get this error too, but there console-feed just lives in the same page (so no iframe like CodeSandbox). Any hints how we could avoid this error in that setup? |
console-feed/src/Hook/index.ts Line 47 in 8cca0ef
Encode function should be removed |
Would you be interested in a PR to make this an option? Or should we fork the library for our use case? |
@koenbok PR would be ideal, something like |
@samdenty I just created a PR for this ^ |
Available in 2.8.8 |
Thanks! |
Thanks for the great library!
I seem to have ran into an eccentric recursion issue.
You can quickly notice the page slowing down. When you inspect the log you get a result like this:
cc @CompuIves CodeSandbox has this too!
The text was updated successfully, but these errors were encountered: