Skip to content

feat: export new prop for web #709

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

Merged
merged 3 commits into from
Nov 23, 2020
Merged

Conversation

WoLewicki
Copy link
Member

@WoLewicki WoLewicki commented Nov 13, 2020

Description

Export shouldUseActivityState in web. Fixes #701 .

Changes

Added shouldUseActivityState to the exported constants in index.js with true value, which can be useful when the support for active prop is dropped in the react-navigation.

Checklist

  • Ensured that CI passes

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
src/index.js Outdated
let { active, activityState, style, enabled = true, ...rest } = this.props;
if (active !== undefined && activityState === undefined) {
console.warn(
'It appears that you are using old version of react-navigation library. Please update @react-navigation/bottom-tabs, @react-navigation/stack and @react-navigation/drawer to version 5.10.0 or above to take full advantage of new functionality added to react-native-screens'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure about this warning. This doesn't necessarily mean that it's used by React Navigation. This warning will also appear in 4.x versions of React Navigation libs which won't be easy to upgrade.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the same warning in index.native.js. I think we would like to inform users that upgrading react-native-screens without the update of react-navigation can result in some bugs. How would you see it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@WoLewicki I thought use of old API should stay the same, no? btw we'll drop use of old API in v6 entirely.

Copy link
Member Author

Choose a reason for hiding this comment

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

On the native side, the old API was removed, the new one can be not entirely compatible.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, maybe consider bumping the version to major if the change isn't backward compatible.

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.

src/index.js is missing a shouldUseActivityState export
2 participants