Import preact devtools renderer code#2148
Merged
Merged
Conversation
0cd3c5c to
bc7d3af
Compare
Member
Author
|
I'm unsure if I should move it to |
On top of that make sure that all context values are serialized properly
485b9c3 to
9dcfd64
Compare
Member
Author
|
I think this PR is ready to review since a few days. If there is anything to make reviewing it easier, please reach out. |
JoviDeCroock
approved these changes
Dec 5, 2019
| // from the start. `performance.now()` will always return a double. | ||
| // See https://github.com/facebook/react/issues/14365 | ||
| // and https://slidr.io/bmeurer/javascript-engine-fundamentals-the-good-the-bad-and-the-ugly | ||
| vnode.startTime = NaN; |
| * @returns {boolean} | ||
| */ | ||
| export function isRoot(vnode) { | ||
| return vnode._parent == null && vnode.type === Fragment; |
Member
There was a problem hiding this comment.
Makes me wonder if we need a special indicator for this node
Member
Author
There was a problem hiding this comment.
Yeah, true, we may need something to mark root nodes as roots instead of plain Fragments in the future. Right now this is an ok workaround and if it's just for the devtools it's fine by me. But if it makes it some future feature easier in core I'm all for it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an integration for our custom devtools 🎉
Tasks:
jsonifywith someSuspensecomponents in demo appcreateContextvalue always parsed as anobject