Skip to content

removed update from componentDidMount to prevent double connect call.#110

Merged
developit merged 1 commit intodevelopit:masterfrom
cj:patch/remove-mount-update
Sep 19, 2018
Merged

removed update from componentDidMount to prevent double connect call.#110
developit merged 1 commit intodevelopit:masterfrom
cj:patch/remove-mount-update

Conversation

@cj
Copy link
Contributor

@cj cj commented Aug 29, 2018

The state is already getting set here https://github.com/developit/unistore/blob/master/src/integrations/preact.js#L24 and here https://github.com/developit/unistore/blob/master/src/integrations/react.js#L29. So calling update() in componentDidMount is redundant and causing connect to be triggered twice on mount.

@developit developit merged commit bcc0cd5 into developit:master Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants