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
hey,
i am trying to change the direction of the html based on the changing language.
in the _document.js file i have placed this:
import useLanguageQuery from "next-export-i18n";
const [query] = useLanguageQuery();
but then i get:
1 of 1 unhandled error
Server Error
TypeError: next_export_i18n__WEBPACK_IMPORTED_MODULE_2___default is not iterable (cannot read property Symbol(Symbol.iterator))
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Source
I am not exactly sure about your code, but from the code snippet, it looks like you are trying to call the useLanguageQuery-hook from outside a function component.
Only Call Hooks from React Functions
Don’t call Hooks from regular JavaScript functions. Instead, you can:
✅ Call Hooks from React function components.
✅ Call Hooks from custom Hooks (we’ll learn about them on the next page).
hey,
i am trying to change the direction of the html based on the changing language.
in the _document.js file i have placed this:
but then i get:
1 of 1 unhandled error
Server Error
TypeError: next_export_i18n__WEBPACK_IMPORTED_MODULE_2___default is not iterable (cannot read property Symbol(Symbol.iterator))
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Source
do i miss something?
The text was updated successfully, but these errors were encountered: