-
I need Typescript types for containerRef, panelRootRef, and rootRef in the autocomplete code.
I get complaints for
Those didn't work. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I found this autocomplete code that has typescript already, so I don't need to struggle with converting React to Typescript: |
Beta Was this translation helpful? Give feedback.
-
It turns out I do need the types for those const because React 18 needs them. I found this works:
|
Beta Was this translation helpful? Give feedback.
I found this autocomplete code that has typescript already, so I don't need to struggle with converting React to Typescript:
https://codesandbox.io/s/github/algolia/autocomplete/tree/next/examples/react-instantsearch-hooks?file=/src/App.tsx