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

[v4] | [v2] React 18 types #1098

Closed
reichhartd opened this issue Sep 10, 2022 · 13 comments · Fixed by #1123
Closed

[v4] | [v2] React 18 types #1098

reichhartd opened this issue Sep 10, 2022 · 13 comments · Fixed by #1123
Labels
bug Something isn't working no-issue-activity

Comments

@reichhartd
Copy link

reichhartd commented Sep 10, 2022

Bug

React Native has been using React 18 since version 0.69. Therefore, it is recommended to also raise the resolution of @types/react package to version 18.

With this version bump there were a few breaking changes, which we have already fixed in our repository. Unfortunately, the TypeScript compiler also complains about bugs in this package.

The option skipLibCheck has no effect here, because it only affects .d.ts files. But this library also publishes the source .ts files to NPM, so they are checked by the TypeScript compiler too.

A potential fix would be to raise the version, but this is likely to cause problems for TypeScript users running version 17 of @types/react.
An alternative solution would be to no longer publish the source files to NPM.

Environment info

Library Version
@gorhom/bottom-sheet ^4.4.4
react-native 0.70.0
react-native-reanimated ^3.0.0-rc.2
react-native-gesture-handler ^2.6.0

Steps To Reproduce

  1. Set up a new project with the React Native Template TypeScript
  2. Make sure that @types/react is used in version 18
  3. Install @gorhom/bottom-sheet and use it somewhere
  4. Run tsc --noEmit

Describe what you expected to happen:

That the TypeScript compile does not display any errors.

Reproducible sample code

Doesn't make sense here, since you can't run the TypeScript compiler check in an expo snack.

@reichhartd reichhartd added the bug Something isn't working label Sep 10, 2022
@reichhartd reichhartd changed the title [v4] | [v2] Issue title [v4] | [v2] React 18 types Sep 10, 2022
@stropho stropho mentioned this issue Sep 30, 2022
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@reichhartd
Copy link
Author

reichhartd commented Oct 10, 2022

Please leave it open 🙏
There is a PR for it

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@reichhartd
Copy link
Author

Ping

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@reichhartd
Copy link
Author

Ping

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@reichhartd
Copy link
Author

Ping

@crukundo
Copy link

crukundo commented Feb 8, 2023

Ping

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@reichhartd
Copy link
Author

Ping

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants