You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed hot reload was not working when making changes to index.tsx. Narrowed it down to being caused by the useRoute import. Problem went away if I moved the function into index.tsx or if I imported from translate.tsx. Renaming didn't help.
This led me to try adding the import to Layout.tsx, where translate.tsx is also imported.
For now I've left the import there as a hack to keep hot reload working.
There's no error as far as I can see. In the browser console it still seems to log and identify which components have been updated.
Layout.tsx is used by gatsby-plugin-layout. Maybe that's related to the problem.
Can we remove that plugin? Or is there an issue on Github with a workaround?
The text was updated successfully, but these errors were encountered:
Imports useRoute in Layout.tsx. Without this, hot reload isn't working
when making changes to index.tsx. The logs appear and show the expected
component name that has changed, but the component is not actually
updated.
An issue has been created to find a proper solution:
#14
Problem
Noticed hot reload was not working when making changes to
index.tsx
. Narrowed it down to being caused by theuseRoute
import. Problem went away if I moved the function intoindex.tsx
or if I imported fromtranslate.tsx
. Renaming didn't help.This led me to try adding the import to
Layout.tsx
, wheretranslate.tsx
is also imported.For now I've left the import there as a hack to keep hot reload working.
There's no error as far as I can see. In the browser console it still seems to log and identify which components have been updated.
Layout.tsx
is used bygatsby-plugin-layout
. Maybe that's related to the problem.Can we remove that plugin? Or is there an issue on Github with a workaround?
The text was updated successfully, but these errors were encountered: