-
Notifications
You must be signed in to change notification settings - Fork 333
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
Clean TS install, View
type errors.
#130
Comments
Same Error with me, it's a eslint error. bumping next and next-eslint-config both to 13.4.0 solves some of problems but linting ones remain the same |
I did what @vegancat suggested and it seemed to fix most of the errors with the interface ViewProps {
children: ReactNode
orbit?: boolean
className?: string
} I'm not sure if that's the best approach, but it seems to get rid of the ts error, at least. |
Same issue and even worse. This is supper horrible |
@tunztunztunz's suggestion resolved the View component problems for me. Installing @types/three resolved all the type issues on the Three components. I also needed to add a |
usePostprocess.tsx is also full of errors. even after updating next and next eslint. |
The Common component should be typed like this: type CommonProps = { color?: THREE.ColorRepresentation }
export const Common = ({ color }: CommonProps) => (...) and the View component should be typed like this: type ViewProps = HTMLAttributes<HTMLDivElement> & {
orbit?: boolean
}
const View = forwardRef<HTMLElement, ViewProps>(({ children, orbit, ...props }, ref) => {..} I would make a PR, but it seems like the ts flavored template is hidden. |
patch if it's helpful |
After a clean install using
yarn create r3f-app next app -ts
, theView
components in bothapp/page.tsx
andapp/blob/page.tsx
show the following errors:Inside
src/components/canvas/View.tsx
the type errors above are present on theForwardRef
, as well as a type error onPerspectiveCamera
.The app still runs and does not output any errors to the terminal or browser console.
Node
v16.14.2
, MacOSv12.5.1
The text was updated successfully, but these errors were encountered: