<legend id='L7bTz'><style id='L7bTz'><dir id='L7bTz'><q id='L7bTz'></q></dir></style></legend>
    <i id='L7bTz'><tr id='L7bTz'><dt id='L7bTz'><q id='L7bTz'><span id='L7bTz'><b id='L7bTz'><form id='L7bTz'><ins id='L7bTz'></ins><ul id='L7bTz'></ul><sub id='L7bTz'></sub></form><legend id='L7bTz'></legend><bdo id='L7bTz'><pre id='L7bTz'><center id='L7bTz'></center></pre></bdo></b><th id='L7bTz'></th></span></q></dt></tr></i><div id='L7bTz'><tfoot id='L7bTz'></tfoot><dl id='L7bTz'><fieldset id='L7bTz'></fieldset></dl></div>

    <small id='L7bTz'></small><noframes id='L7bTz'>

        <bdo id='L7bTz'></bdo><ul id='L7bTz'></ul>
      <tfoot id='L7bTz'></tfoot>
    1. 在屏幕之间发送状态反应原生

      Sending states between screens react native(在屏幕之间发送状态反应原生)

          <small id='MGXP2'></small><noframes id='MGXP2'>

          1. <legend id='MGXP2'><style id='MGXP2'><dir id='MGXP2'><q id='MGXP2'></q></dir></style></legend><tfoot id='MGXP2'></tfoot>
            <i id='MGXP2'><tr id='MGXP2'><dt id='MGXP2'><q id='MGXP2'><span id='MGXP2'><b id='MGXP2'><form id='MGXP2'><ins id='MGXP2'></ins><ul id='MGXP2'></ul><sub id='MGXP2'></sub></form><legend id='MGXP2'></legend><bdo id='MGXP2'><pre id='MGXP2'><center id='MGXP2'></center></pre></bdo></b><th id='MGXP2'></th></span></q></dt></tr></i><div id='MGXP2'><tfoot id='MGXP2'></tfoot><dl id='MGXP2'><fieldset id='MGXP2'></fieldset></dl></div>

            • <bdo id='MGXP2'></bdo><ul id='MGXP2'></ul>
                <tbody id='MGXP2'></tbody>

              1. 本文介绍了在屏幕之间发送状态反应原生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我目前正在使用一个应用程序,该应用程序将为您提供来自幻想 api 的类/种族/背景故事.我在创建项目时使用了 expo 的标签模板.

                Am currently working with an app that will provide you with a class/race/background story from an fantasy api. I used expo's tab template when i created the project.

                所以我的问题是如何将我在比赛屏幕中获取的数据发送到我的背景故事屏幕以获取正确的背景故事?我一直在尝试用谷歌搜索它,但找不到有帮助的答案,我唯一发现的是它与导航器有关,因此我链接它.

                So my question is how would I send data that i fetched in my Race screen to my background-story screen in order to fetch the correct background-story? I've been trying to googling it but couldnt find an answer that helped, the only thing i found is that its something to do with the navigator, hence why i link it.

                Maintabnavigator.js

                Maintabnavigator.js

                    import React from 'react';
                import { Platform } from 'react-native';
                import { createStackNavigator, createBottomTabNavigator, createDrawerNavigator } from 'react-navigation';
                import { Icon } from 'expo';
                import { Ionicons} from '@expo/vector-icons';
                import HomeScreen from '../screens/HomeScreen';
                import CharacterScreen from '../screens/CharacterScreen';
                import BackgroundDetails from '../screens/CharacterScreens/BackgroundDetails';
                import RaceDetails from '../screens/CharacterScreens/RaceDetails';
                import ClassDetails from '../screens/CharacterScreens/ClassDetails';
                
                
                const RaceStack = createStackNavigator({
                  race: RaceDetails
                });
                const ClassStack = createStackNavigator({
                  class: ClassDetails
                });
                const BackgroundStack = createStackNavigator({
                  background: BackgroundDetails
                });
                const GeneratorStack = createStackNavigator({
                  generator: CharacterScreen,
                });
                
                
                GeneratorStack.navigationOptions= {
                  tabBarLabel: 'Generator',
                  tabBarIcon: ({focused}) => (
                    <Icon.Entypo
                      focused={focused}
                      name={'retweet'}
                      size={26}
                    />
                  )
                }
                RaceStack.navigationOptions= {
                  tabBarLabel: 'Race',
                  tabBarIcon: ({focused}) => (
                    <Icon.MaterialIcons
                      focused={focused}
                      name={'person'}
                      size={26}
                    />
                  )
                }
                ClassStack.navigationOptions= {
                  tabBarLabel: 'Class',
                  tabBarIcon: ({focused}) => (
                    <Icon.MaterialCommunityIcons
                      focused={focused}
                      name={'sword-cross'}
                      size={26}
                    />
                  )
                }
                BackgroundStack.navigationOptions= {
                  tabBarLabel: 'Background Story',
                  tabBarIcon: ({focused}) => (
                    <Icon.Feather
                      focused={focused}
                      name={'book'}
                      size={26}
                    />
                  )
                }
                export default createBottomTabNavigator({
                  GeneratorStack,
                  ClassStack,
                  RaceStack,
                  BackgroundStack,
                });
                

                推荐答案

                当您从一个屏幕导航到另一个屏幕时,如下所示:

                When you navigate from one screen to another as follows:

                this.props.navigation.navigate('ContactDisplay', { item });
                

                您可以在另一个屏幕中访问项目",如下所示:

                You may access 'item' in the other screen as follows:

                console.log(this.props.navigation.state.params.item);
                

                这篇关于在屏幕之间发送状态反应原生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Gradient Button to background-color blinks on hover(悬停时背景颜色的渐变按钮闪烁)
                How to make hovering over active button not use hover effect?(如何使悬停在活动按钮上不使用悬停效果?)
                html javascript show image hover(html javascript 显示图像悬停)
                How to get css hover values on click?(如何在点击时获得 css 悬停值?)
                Change background image on link hover(更改链接悬停时的背景图像)
                Highlight multiple items on hover#39;s condition(突出显示悬停条件下的多个项目)
                  1. <i id='LhKzp'><tr id='LhKzp'><dt id='LhKzp'><q id='LhKzp'><span id='LhKzp'><b id='LhKzp'><form id='LhKzp'><ins id='LhKzp'></ins><ul id='LhKzp'></ul><sub id='LhKzp'></sub></form><legend id='LhKzp'></legend><bdo id='LhKzp'><pre id='LhKzp'><center id='LhKzp'></center></pre></bdo></b><th id='LhKzp'></th></span></q></dt></tr></i><div id='LhKzp'><tfoot id='LhKzp'></tfoot><dl id='LhKzp'><fieldset id='LhKzp'></fieldset></dl></div>

                      <small id='LhKzp'></small><noframes id='LhKzp'>

                          <bdo id='LhKzp'></bdo><ul id='LhKzp'></ul>
                          <legend id='LhKzp'><style id='LhKzp'><dir id='LhKzp'><q id='LhKzp'></q></dir></style></legend>
                            <tbody id='LhKzp'></tbody>
                        • <tfoot id='LhKzp'></tfoot>