-
-
Notifications
You must be signed in to change notification settings - Fork 866
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
Fix typescript examples error #1868
base: master
Are you sure you want to change the base?
Conversation
Fix error: [0] src/App.tsx(9,34): error TS2769: No overload matches this call. [0] Overload 1 of 2, '(props: (RouteProps<string, { [x: string]: string; }> & OmitNative<{}, keyof RouteProps<string, { [x: string]: string; }>>) | Readonly<RouteProps<string, { ...; }> & OmitNative<...>>): Route<...>', gave the following error. [0] Type 'typeof Home' is not assignable to type 'ComponentType<RouteComponentProps<any, StaticContext, unknown>> | ComponentType<any>'. [0] Type 'typeof Home' is not assignable to type 'ComponentClass<RouteComponentProps<any, StaticContext, unknown>, any>'. [0] The types of 'contextType.Provider.propTypes.children' are incompatible between these types. [0] Type 'React.Validator<React.ReactNode>' is not assignable to type 'import("C:/Users/craig/Projects/razzle-line-numbers/node_modules/@types/react-router/node_modules/@types/react/index").Validator<import("C:/Users/craig/Projects/razzle-line-numbers/node_modules/@types/react-router/node_modules/@types/react/index").ReactNode>'. [0] Type 'React.ReactNode' is not assignable to type 'import("C:/Users/craig/Projects/razzle-line-numbers/node_modules/@types/react-router/node_modules/@types/react/index").ReactNode'. [0] Type '{}' is not assignable to type 'ReactNode'. [0] Overload 2 of 2, '(props: RouteProps<string, { [x: string]: string; }> & OmitNative<{}, keyof RouteProps<string, { [x: string]: string; }>>, context: any): Route<...>', gave the following error. [0] Type 'typeof Home' is not assignable to type 'ComponentType<RouteComponentProps<any, StaticContext, unknown>> | ComponentType<any>'. Inspired by: vercel/next.js#35986 vercel/next.js#36019 Fixes jaredpalmer#1867
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I have discovered a new error.
It's the one starting with Reproducible example
I see the old versions of TypeScript and React being used. I could take a look into upgrading these in the example after the bug presented above is solved. |
@fivethreeo Hi! Just targeting your attention because I thought this was a good place to post the previous message in here but now I am doubting myself. Do you still work on Razzle? Should I open a new issue? |
Moving here https://github.com/elzzad/dazzle |
@dtabuenc is helping out once babel loader is in help wanted on more plugins and docs |
I comprehend that I can post the message above in the Dazzle repo. What is the history of Dazzle and its purpose? How stable it is? What breaking changes does it introduce? If it is the future, what would be an easy (starting) issue where I can help? Thanks a lot and good luck 😃 |
Same purpose as razzle, not ready yet so stability unknown. Porting plugins from the alpha branch of razzle. Porting plugins from master branch of razzle. Making parts of razzle default config into plugins. But first make babel work in dazzle. |
@fivethreeo I want to give a try to help making babel work in dazzle. Should I start looking into the razzle code or directly into dazzle code? And in what branch? Eventually, a starting file? Any more indications? Thanks. |
@dtabuenc is working on babel over the weekend |
Join us on discord https://discord.gg/tK9ZgcwwKv |
Fix error:
[0] src/App.tsx(9,34): error TS2769: No overload matches this call.
[0] Overload 1 of 2, '(props: (RouteProps<string, { [x: string]: string; }> & OmitNative<{}, keyof RouteProps<string, { [x: string]: string; }>>) | Readonly<RouteProps<string, { ...; }> & OmitNative<...>>): Route<...>', gave the following error.
[0] Type 'typeof Home' is not assignable to type 'ComponentType<RouteComponentProps<any, StaticContext, unknown>> | ComponentType'.
[0] Type 'typeof Home' is not assignable to type 'ComponentClass<RouteComponentProps<any, StaticContext, unknown>, any>'.
[0] The types of 'contextType.Provider.propTypes.children' are incompatible between these types.
[0] Type 'React.Validator<React.ReactNode>' is not assignable to type 'import("C:/Users/craig/Projects/razzle-line-numbers/node_modules/@types/react-router/node_modules/@types/react/index").Validator<import("C:/Users/craig/Projects/razzle-line-numbers/node_modules/@types/react-router/node_modules/@types/react/index").ReactNode>'.
[0] Type 'React.ReactNode' is not assignable to type 'import("C:/Users/craig/Projects/razzle-line-numbers/node_modules/@types/react-router/node_modules/@types/react/index").ReactNode'.
[0] Type '{}' is not assignable to type 'ReactNode'.
[0] Overload 2 of 2, '(props: RouteProps<string, { [x: string]: string; }> & OmitNative<{}, keyof RouteProps<string, { [x: string]: string; }>>, context: any): Route<...>', gave the following error.
[0] Type 'typeof Home' is not assignable to type 'ComponentType<RouteComponentProps<any, StaticContext, unknown>> | ComponentType'.
Inspired by:
vercel/next.js#35986
vercel/next.js#36019
Fixes #1867