-
Notifications
You must be signed in to change notification settings - Fork 34
[example][apollo-client][react-navigation] fix type errors #82
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
Conversation
| } | ||
|
|
||
| function TestCase<T>({ title, route }: { title: string; route: LinkProps<T>['href'] }) { | ||
| function TestCase({ title, route }: { title: string; route: LinkProps['href'] }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LinkProps is not generic type from newer expo-router
|
|
||
| export function useReactNavigationDevTools(ref: React.RefObject<NavigationContainerRef<any>>) { | ||
| export function useReactNavigationDevTools( | ||
| ref: React.RefObject<NavigationContainerRef<any> | null> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as #70
| globalThis.__REDUX_DEVTOOLS_EXTENSION__ = { | ||
| connect: () => adapterRef.current, | ||
| }; | ||
| // @ts-ignore: useReduxDevToolsExtension does not accept null ref from NavigationContainerRefWithCurrent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess the problem is actually from react-navigation/devtools
| "expo": "53.0.7", | ||
| "expo-module-scripts": "^4.1.7", | ||
| "graphql": "^16.9.0", | ||
| "react-dom": "19.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bun adds @apollo/client as different dep that example's apollo-client has react-dom peerDep and this plugin does not.
to resolve the type error, this is a workaround to add react-dom from the plugin, so that bun can treat the apollo/client as same package and same type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting
Why
fix typecheck errors
fixes #70
How
@apollo/client. to workaround this, i have to add react-dom devDeps to the apollo plugin, so bun will keep the same resolutionTest Plan
add typecheck to ci