-
Notifications
You must be signed in to change notification settings - Fork 141
Add symbol for element status #49
Add symbol for element status #49
Conversation
Does anything check |
It's never used in Roact; I've removed it. Should be good to go! |
One more note, should we expose this symbol? If we want to start exposing these type markers, should we have them of the form element = {
[Core.isElement] = true,
} or of the form element = {
type = Core.Element,
} |
It really should be exposed - that's the point of #20. I think it's probably best to store it with the symbol as the key just to avoid colliding with anything, but really it could go either way. |
I think we get better error messages if we key with |
We can't use Lines 115 to 119 in 340e013
|
Hah! I want to change that field to be |
Should I change it to that then? :p |
Yeah! |
Should be good to go now, though this will cause merging problems with #50. |
Conflicts are now a go! 😅 |
@@ -37,7 +37,7 @@ local function isPortal(element) | |||
return false | |||
end | |||
|
|||
return element.type == Core.Portal | |||
return element.component == Core.Portal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eurgh, I can't wait to rewrite the reconciler + tests so that we have better coverage for refactors like this...
Super simple PR that fixes #20. Adds a symbol,
Roact.Element
, that is present in every table returned fromRoact.createElement
.