反应导航准备好进行Web开发了吗?

问题描述 投票:0回答:2

我是react-router的用户,在做我的第一个博览会(SDK36)应用程序时发现了react-navigation

我想支持Web和本机,在测试react-navigation演示之后,我想知道如果示例不支持Web,为什么会有web兼容性。

此外,我们直接使用suggested库的expo文档react-router

当前行为

当我在example expo start-web上运行时,

由于打字稿,我有编译问题:

 web  Failed to compile.
/home/dka/workspace/github.com/react-navigation/react-navigation/example/App.tsx
SyntaxError: /home/dka/workspace/github.com/react-navigation/react-navigation/example/App.tsx: Unexpected token (42:17)

  40 | import TabsInDrawer from './src/TabsInDrawer';
  41 | 
> 42 | const ExampleInfo: any = {
     |                  ^
  43 |   CustomTabUI: {
  44 |     description: 'Render additional views around a Tab navigator',
  45 |     name: 'Custom Tabs UI',

并且网络显示:

预期行为

我希望它可以在网络上运行

如何复制

git clone [email protected]:react-navigation/react-navigation.git cd react-navigation git checkout v4.0.10 yarn bootstrap cd example npx expo start --web

您的环境

| software | version | | ---------------- | ------- | | react-navigation | v4.0.10 | | react-native | v0.59.8 | (through expo SDK33 used by the demo) | node | v13.5.0 | | yarn | v1.21.1 |

React-navigation是否已准备好用于Web开发,或者我应该为Web使用React-Router-dom?

我是react-router的用户,在做我的第一个Expo(SDK36)应用程序时发现了react-navigation。我想支持网络和本机,在测试了反应导航演示之后,我想知道为什么会有...

node.js reactjs react-native react-router react-navigation
2个回答
1
投票
没有您应该将React Router用于Web。

0
投票
它声称可以在网络上运行,但功能为"experimental"。没有很好的社区支持,每隔一段时间阅读文档,您会发现该功能在网络上不起作用。所以我想说它还没有准备好用于网络]
© www.soinside.com 2019 - 2024. All rights reserved.