Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: React.useRef is not a function #96

Open
logivity opened this issue Dec 22, 2022 · 1 comment
Open

Error: React.useRef is not a function #96

logivity opened this issue Dec 22, 2022 · 1 comment

Comments

@logivity
Copy link

Getting error trying to use simple use case.

Typescript throwing error when trying to import Typical

Could not find a declaration file for module 'react-typical'. 'd:/Websites/AAG Innovations/V3/aag-innov-v3-0/node_modules/react-typical/dist/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/react-typical if it exists or add a new declaration (.d.ts) file containing declare module 'react-typical';ts(7016)

@birkj
Copy link

birkj commented Feb 15, 2023

Think you're using a server component in React 18. Try declaring "use client"; at the top of the component. You could wrap the Typical component in your own wrapper component, if you don't want the whole page/component to be a client component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants