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
Update: After i moved all shared between frontend and backend functions to shared root folder - problem gone.
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see fb.me/rules-of-hooks
in MyApp (at _document.tsx:12)
in Context.Provider
in Context.Provider
in StyleSheetManager
in Unknown
in Context.Provider
in Context.Provider
in Context.Provider
in Context.Provider
in AppContainer
The component MainLayout__Wrapper with the id of "MainLayout__Wrapper-sc-13q3s8p-0" has been created dynamically.
You may see this warning because you've called styled inside another component.
To resolve this only create new StyledComponents outside of any render method and function component.
In backend graphql mutation function i load function from frontend. If i load it like @frontend i get, not if i use ../../frontend/functions/joi.
// no error - import { isValid } from "../../frontend/functions/joi";
// error - import { isValid } from "@frontend";
import { isValid } from "@frontend";
export const userCreate = async (): Promise<boolean> => {
isValid();
return true;
};
In frontend index.ts file i re-export isValid joi function and MainLayout react component. If i delete MainLayout component export warning goes away too.
export * from "./functions/joi";
// no error if i delete this import
export * from "./layout/MainLayout";
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I get strange warning and not sure why:
Github small repo to reproduce (run
npm i
,npm run dev
).Update: After i moved all shared between frontend and backend functions to shared root folder - problem gone.
In
tsconfig.json
i have paths:In backend graphql mutation function i load function from frontend. If i load it like
@frontend
i get, not if i use../../frontend/functions/joi
.In frontend
index.ts
file i re-exportisValid
joi function andMainLayout
react component. If i delete MainLayout component export warning goes away too.Beta Was this translation helpful? Give feedback.
All reactions