Skip to content

Have React ignore a specific DOM element #6622

@nickdima

Description

@nickdima

As per my chat here with @gaearon I'm filing an issue to discuss this further.

I would like to avoid a specific element that I rendered on the server from beeing further updated by react once it reaches the client.
One specific use case is rendering ad server tags that are kind of a pain in the ars, using things like document.write, etc. I render them using dangerouslySetInnerHTML but sometimes when React is doing the reconciliation client side they get re-render so they stop executing. Now I managed to track down some of these cases by fixing render differences between server and client which would trigger DOM patching but it still seems to happen.
Any advice?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions