Skip to content

Conversation

@Kudo
Copy link
Collaborator

@Kudo Kudo commented Oct 13, 2025

Why

fix typecheck errors
fixes #70

How

  • fix nullable NavigationContainerRef from react-navigation
  • for apollo-client, bun treats dependency differently for react-dom as peerDependnecy from @apollo/client. to workaround this, i have to add react-dom devDeps to the apollo plugin, so bun will keep the same resolution

Test Plan

add typecheck to ci

@Kudo Kudo requested a review from vonovak October 13, 2025 18:55
}

function TestCase<T>({ title, route }: { title: string; route: LinkProps<T>['href'] }) {
function TestCase({ title, route }: { title: string; route: LinkProps['href'] }) {
Copy link
Collaborator Author

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>
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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",
Copy link
Collaborator Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting

@Kudo Kudo merged commit a972355 into main Oct 14, 2025
1 check passed
@Kudo Kudo deleted the @kudo/fix-typecheck branch October 14, 2025 07:15
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

Successfully merging this pull request may close these issues.

Mismatch between useReactNavigationDevTools and React Navigation container

3 participants