-
Notifications
You must be signed in to change notification settings - Fork 48.5k
Validate node nesting structure #644
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
Conversation
This solution feels a little gross to me, but I haven't been able to come up with anything better. Fixes facebook#101.
I ran react-bench and there was no significant perf difference relative to master. |
It's been a while since I've had context to this particular problem. Here's a couple of thoughts:
|
Yeah, that makes sense and is simpler for sure. I considered it before I implemented it. This seemed cleaner before I implemented it; but it turns out that this way is a lot of code! I was sort of hoping that the MountImage class could store more info in the future so you could check descendant nesting (for nested |
@spicyj - I hear you on the "cleaner" part. In fact, I like this much better. But for the web, at least, we'll probably always want the "image" to be either a chunk of markup, or a single DOM node (when node creation becomes faster in all browsers). |
What's the status here? Do we want to pursue this diff? |
I'll close it for now. |
This is a better version of facebook#644. Fixes facebook#101.
Nicer version of facebook#644 and facebook#735. Fixes facebook#101. Context is neat.
This solution feels a little gross to me, but I haven't been able to come up with anything better.
Fixes #101.