gaearon / gaearon/react-side-effect

prevent handleStateChangeOnClient being called for server rendered items

Open
#30 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
74
PR merge metrics
No merged PRs in 30d

Description

I'm creating a DataLayer component to interact with google tag manager in an isomorphic way.

And thus far this works great, because I collect the events using my DataLayer component, and generate a javascript snippet with the `dataLayer` variable set to the rewinded data of the component.

But when the client application loads, it calls `handleStateChangeOnClient` with the same values, even though the properties of the rendered components didn't change.

Is there a way to circumvent this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.