Skip to content
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

react native #5

Open
xiaxiazhu opened this issue Nov 19, 2016 · 0 comments
Open

react native #5

xiaxiazhu opened this issue Nov 19, 2016 · 0 comments

Comments

@xiaxiazhu
Copy link
Owner

xiaxiazhu commented Nov 19, 2016

  • rn本质上是在native端实现了相应的语法改造,最终将前端代码切换为native的UI。可以简单形象的理解为native的webkit

用第三方组件

debuger

rn提供了超级方便的debuger工具和体验。
首先,xcode中启动程序,模拟器开启,页面出现。
cmd +R hot reload,意思是,本地代码修改,直接更新到native的模拟视窗。
cmd + D dev Menu.debuger类型选择: 包括重载,远程js模拟器,hot reloading等。

http://localhost:8081/debugger-ui 允许在devtools中debug。

rn中坑的海洋

  • facebook issues
  • 有意思的bug,在一次端口冲突之后,简单的demo:
    react-native init projectname
    之后,你可以得到简单的demo程序,可是发现重复的rebuild居然会报错,这tmd可是react-native官方给出的demo啊,代码肯定是不会出错的,那为什么relaod之后会报错呢?
    现象大概是:在端口冲突之后,就算是把端口kill掉,也会有问题。没有办法进入transforming 的流程。
    暂时的解决:把端口kill掉,把product删掉,再不行,换端口,把8081换掉。找ios的同学debug一下,这东西是没有挂的,以此类推,很多自己开发的app都会有此问题。

快速进入状态

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

No branches or pull requests

1 participant