Skip to content
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

Type Error: error TS2322 react-native-infinite-pager/src/index.tsx #34

Open
FlandiaYingman opened this issue Sep 18, 2024 · 1 comment

Comments

@FlandiaYingman
Copy link

node_modules/react-native-infinite-pager/src/index.tsx:538:17 - error TS2322: Type 'InfinitePagerPageComponent | MemoExoticComponent<InfinitePagerPageComponent> | undefined' is not assignable to type 'InfinitePagerPageComponent | undefined'.   
  Type 'MemoExoticComponent<InfinitePagerPageComponent>' is not assignable to type 'InfinitePagerPageComponent | undefined'.
    Type 'MemoExoticComponent<InfinitePagerPageComponent>' is not assignable to type 'InfinitePagerPageComponent'.
      Type 'ReactNode' is not assignable to type 'Element | null'.
        Type 'undefined' is not assignable to type 'Element | null'.

538                 PageComponent={PageComponent}
                    ~~~~~~~~~~~~~

  node_modules/react-native-infinite-pager/src/index.tsx:560:3
    560   PageComponent?: InfinitePagerPageComponent;
          ~~~~~~~~~~~~~
    The expected type comes from property 'PageComponent' which is declared here on type 'IntrinsicAttributes & PageWrapperProps'
@camarm-dev
Copy link

Same issue. tsc outputs the same error.

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

No branches or pull requests

2 participants