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

[TS] PagerView typescript is broken #823

Closed
AlirezaHadjar opened this issue May 3, 2024 · 8 comments · Fixed by #827
Closed

[TS] PagerView typescript is broken #823

AlirezaHadjar opened this issue May 3, 2024 · 8 comments · Fixed by #827
Assignees

Comments

@AlirezaHadjar
Copy link

AlirezaHadjar commented May 3, 2024

Description

I just noticed that in the latest version, the typescript of this package is not working as expected.

Reproducible Demo

  1. Create a ref:
const ref = useRef<PagerView>(null);

Now you will get this ts error: 'PagerView' refers to a value, but is being used as a type here. Did you mean 'typeof PagerView'

Screenshot 2024-05-03 at 7 06 04 PM

@renchap
Copy link

renchap commented May 3, 2024

I can reproduce this with 6.3.1, while it works with 6.3.0.

#817 has been merged and is in the v6.3.1 tag which I think it a mistake, because it means that 6.3.1 is in equivalent to 7.0.0-rc2?

Pining @troZee here because I do not think this was your intent at all!

@asusoft
Copy link

asusoft commented May 8, 2024

any fix??

@sergeymild
Copy link

The same error

@Jonnboy91
Copy link

I came across this same issue as well. Noticed that on iOS it still seemed to work even with the typescript complaints, but Android was not working anymore on the screens that uses this.

As mentioned previously locking the version to 6.3.0 works.

@troZee
Copy link
Member

troZee commented May 15, 2024

Hello 👋
@MrRefactor is ill and he will fix that till the end of this week. Please make the useNext prop as an optional and it should work as a workaround.

DrRefactor added a commit to DrRefactor/react-native-pager-view that referenced this issue May 21, 2024
@DrRefactor
Copy link
Contributor

@troZee I'm not @MrRefactor but funny enough, "almost am" (look at the nicknames). Please see my PR:
#827

@renchap
Copy link

renchap commented May 22, 2024

This is fixing main, but you still published a patch release (6.3.1) with the content of main, which makes it equivalent to a major 7.0.0 release.

@gottfriedaniel
Copy link

When you'll release this fix?

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 a pull request may close this issue.

9 participants