Hydration not working when not using self-closing tag
See original GitHub issueJust starting out with Elderjs, but I ran into a weird issue.
This won’t hydrate on the client:
<Map hydrate-client={{}} ></Map>
…but this will:
<Map hydrate-client={{}} />
I’m working with the v0.2.0 template.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Why is React hydration data within a script tag, commented out?
I'm working on an issue to optimize open source library for server rendering: github.com/shakacode/react_on_rails/pull/660.
Read more >Is it good practice to end coldfusion self-closing tags with "/>"?
Its late but i'll add. When using code reformatting, unclosed tags gets messed up. So its not only good practice its useful with...
Read more >React Has Been Teaching You Invalid HTML! - Hashrocket
In this post I will explore what are void/non-void HTML elements and the consequences of using a self-closing non-void element in pure HTML....
Read more >How do I get matchit to work with '/>' (self-closed tags)?
I am using it for jsx, but it does not seem to work if I have an element that is declared with />...
Read more >HTML1500 Tag cannot be self-closing. Use an explicit closing ...
we are having problems viewing some custom components using the Internet Explorer 11 browser. However it work fine with Chrome/firefox/Edge.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the issue is almost certainly with this regex - https://github.com/Elderjs/elderjs/blob/88060bcf97adb0909dbae39843f4e4820774f6c9/src/partialHydration/partialHydration.ts#L22
if i think a little bit its understandable why children are not supported - hard to draw the line between what is hydrated and what isnt.
we should add a regex for the non-self-closing case and insert an error if found, should be quite cheap.
love it