Denim Demon
Denim Demon

Reputation: 734

Gatsby : Cannot execute componentWillReceiveProps when running 'gatsby develop`

Can anyone explain why when running gatsby develop the Child component’s lifecycle method componentWillReceiveProps is ignored and it is re-mounted with every new change - whereas when building the static version of the app, the Child's componentWillReceiveProps lifecycle method is executed correctly.

See attached ‘dev’ and build gifs, or checkout the source.

Dev

enter image description here

Build

BUILD

Upvotes: 0

Views: 139

Answers (2)

Denim Demon
Denim Demon

Reputation: 734

This issue was resolved by removing gatsby-plugin-preact>

Upvotes: 1

Denim Demon
Denim Demon

Reputation: 734

Thanks to @Nenu, I discovered that the issue is elsewhere. Using the example code in a fresh gatsby project worked as expected.

Upvotes: 0

Related Questions