Open ThermalIDTechnologies opened 4 years ago
I am getting an error on build when trying to set Prismic nodes to state using the useState hook before the return. This works just fine on develop. If anyone has any ideas or solutions for this problem I would be so grateful to hear them!
Example:
Error:
Here is a codesandbox recreating my problem. The code mentioned in this post is in src/templates/ProductDetailTemplate.js https://codesandbox.io/s/gatsby-prismic-test-01bdv?fontsize=14&hidenavigation=1&theme=dark
I am getting an error on build when trying to set Prismic nodes to state using the useState hook before the return. This works just fine on develop. If anyone has any ideas or solutions for this problem I would be so grateful to hear them!
Example:
Error:
Here is a codesandbox recreating my problem. The code mentioned in this post is in src/templates/ProductDetailTemplate.js https://codesandbox.io/s/gatsby-prismic-test-01bdv?fontsize=14&hidenavigation=1&theme=dark