mardi 29 décembre 2020

"React.createContext is not a function" only when i using emotion/styled and @testing-library/react

i am using emotion/styled with next.js and typescript. it works well on "yarn dev" and css/html works very well too but, when i testing with "@testing-library/react" it's return error "React.createContext is not a function"

actually, i was search on google this error. and i found it's module version crash problem so deleted node_modules and i was reinstall modules, but it's still return error.

i think this error is emotion library related. because only when is using emotion library, it's happend.

Aucun commentaire:

Enregistrer un commentaire