Skip to content

fix: renamed createStackNavigator to createNativeStackNavigator #1053

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 1 commit into from
Sep 10, 2021

Conversation

arcollector
Copy link
Contributor

@arcollector arcollector commented Sep 6, 2021

Documentation was refering to createStackNavigator function instead of createNativeStackNavigator

@netlify
Copy link

netlify bot commented Sep 6, 2021

✔️ Deploy Preview for react-navigation-docs ready!

🔨 Explore the source changes: 9b51a2a

🔍 Inspect the deploy log: https://app.netlify.com/sites/react-navigation-docs/deploys/613a75815576a800080a6435

😎 Browse the preview: https://deploy-preview-1053--react-navigation-docs.netlify.app

@arcollector arcollector changed the title renamed createStackNavigator to createNativeStackNavigator fix: renamed createStackNavigator to createNativeStackNavigator Sep 6, 2021
@arcollector arcollector force-pushed the patch-1 branch 2 times, most recently from d68ed50 to 7696e46 Compare September 6, 2021 14:29
Copy link
Member

@kacperkapusciak kacperkapusciak left a comment

Choose a reason for hiding this comment

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

Only import and stack initialization need to be changed. Thanks 🙌


const Stack = createStackNavigator();
const NativeStack = createNativeStackNavigator();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const NativeStack = createNativeStackNavigator();
const Stack = createNativeStackNavigator();

native-stack is also a stack, no need to overdo this.


function MyStack() {
function MyNativeStack() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
function MyNativeStack() {
function MyStack() {


function MyStack() {
return (
<Stack.Navigator
<NativeStack.Navigator

Choose a reason for hiding this comment

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

You forgot to change here and also Screens

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

Documentation was refering to `createStackNavigator` function instead of `createNativeStackNavigator`
@kacperkapusciak kacperkapusciak merged commit c0adeed into react-navigation:main Sep 10, 2021
@arcollector arcollector deleted the patch-1 branch September 10, 2021 14:20
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.

3 participants