React-Native:代码编译正确但屏幕为空

时间:2021-07-23 18:58:32

I am fairly new to react native and have been attempting to build a very simple registration app. Currently I have 2 screens running, the first landingscreen.js includes a button to prompt the first registration screen.

我对原生的反应相当新,并且一直在尝试构建一个非常简单的注册应用程序。目前我有2个屏幕正在运行,第一个landingscreen.js包括一个提示第一个注册屏幕的按钮。

This screen works fine but its title shows as blank. (I am using react-navigator) Below is the screen and you can find the corresponding code here. React-Native:代码编译正确但屏幕为空

此屏幕工作正常,但其标题显示为空白。 (我正在使用react-navigator)下面是屏幕,你可以在这里找到相应的代码。

On clicking the register here button the next screen is prompted which should show two fields an email and password field with the title "Let's create an account". As you can see below , all that works is the next button but I have no compilation errors. The code pertaining to this screen may be accessed here.

单击此处的注册按钮,将提示下一个屏幕,该屏幕应显示两个字段,其中包含标题为“让我们创建一个帐户”的电子邮件和密码字段。正如您在下面看到的,所有可行的是下一个按钮,但我没有编译错误。可以在此处访问与此屏幕相关的代码。

React-Native:代码编译正确但屏幕为空

Any help or way pointing would be more than appreciated. Thanks,

任何帮助或方式指向将不仅仅是赞赏。谢谢,

J.

J.

2 个解决方案

#1


1  

Change navigation(you have written navigtion) spelling

更改导航(您已编写导航)拼写

static navigationOptions= {
    title: "Let's make an account",
               }

#2


0  

The headers not being seen was solved as @Paras Watts noted by fixing a spelling mistake.

没有被看到的标题被解决为@Paras Watts通过修复拼写错误而注意到的。

To get the fields to show I then put the jsx pertaining to the form in the same render as the navigation also changing any tags to view to stick to the format of jsx.

要获取显示的字段,然后将与表单相关的jsx放在与导航相同的渲染中,同时更改任何标记以查看以坚持jsx的格式。

#1


1  

Change navigation(you have written navigtion) spelling

更改导航(您已编写导航)拼写

static navigationOptions= {
    title: "Let's make an account",
               }

#2


0  

The headers not being seen was solved as @Paras Watts noted by fixing a spelling mistake.

没有被看到的标题被解决为@Paras Watts通过修复拼写错误而注意到的。

To get the fields to show I then put the jsx pertaining to the form in the same render as the navigation also changing any tags to view to stick to the format of jsx.

要获取显示的字段,然后将与表单相关的jsx放在与导航相同的渲染中,同时更改任何标记以查看以坚持jsx的格式。