-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
How to get and serve HTML fragments? #9
Comments
Unfortunately it cannot work like that because client-side React will try to re-conciliate with the HTML that has been generated sever side. It's why the fragment must be a React component. |
I actually came up with this, which works, but... Will your assumption be still valid?
Which wil be used like...
|
@napolux This would work as whatever is inside dangerouslySetInnerHTML won't be tracked by React.
Doesn't apply in you sample |
I was wondering how can I render an HTML fragment which is not a component...
For example:
Let's say that
example.com/esi-fragment
is servingSo, as per ESI i can do something like this in an example.com page
And I should see the div rendered in my page.
In all the examples I see online I only can see react components rendered... Which is working, but not really what I want to do.... Is there something I'm getting wrong?
Thanks!
The text was updated successfully, but these errors were encountered: