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

Compatible with react/react-dom@^16.0.0-alpha.7 #13

Merged
merged 4 commits into from
Dec 19, 2017

Conversation

cpunion
Copy link

@cpunion cpunion commented Aug 5, 2017

See fmoo/react-native-web@8a0da1f

简单测试能够编译通过,能够运行,但没有详细用例来测试这部分。

@cpunion
Copy link
Author

cpunion commented Aug 6, 2017

这个实现不兼容 react-web

@cpunion cpunion closed this Aug 6, 2017
@cpunion
Copy link
Author

cpunion commented Aug 6, 2017

我测试环境问题,经测试能够正常工作。

@cpunion cpunion reopened this Aug 6, 2017
@flyskywhy
Copy link
Owner

我这边测提交点 Compatible with react/react-dom@^16.0.0-alpha.7 (实际上是 16.0.0-beta.3 ?)有这样的问题:
如果沿用 react-hot-loader@1.3.1 的话,react-web start 时会报 Module not found: Error: Cannot resolve module 'react/lib/ReactMount'
如果使用最新的 react-hot-loader@3.0.0-beta.7 (并将 webpack.config.js 中的 react-hot 改为 react-hot/webpack),则 HMR 热加载有问题,比如说我修改了一个文字,但是网页上并没有自动更新该文字,估计是 react-hot-loader 这个 beta 版还有问题。

请问你那里有是否有这样的问题?

@cpunion
Copy link
Author

cpunion commented Aug 10, 2017

前一个问题应该是某些库依赖了react低版本,从16.0.0-alpha.7开始就只提供umd版本,不再提供react/lib/*。

后一个问题我还没有测试,我用的是create-react-app创建的,还没发现问题。

@flyskywhy
Copy link
Owner

要不等 react 或 react-hot-loader 至少有一个由 beta 版升级为正式版,再测试合并这个 PR ?

@cpunion
Copy link
Author

cpunion commented Aug 10, 2017

没问题,我有时间也测试一下,目前现在我的项目中使用。

另外,我之前遇到有些问题,都发现因为依赖版本问题,可能安装了多个版本的react或react-dom,这时候手动删除一些老版本,只在node_modules里保留一份,往往就没问题了。然后再解决那些包的依赖版本。很多带状态的库都会这样。上面这问题我不知道是否可能这个原因。

@flyskywhy flyskywhy merged commit 150bae1 into flyskywhy:master Dec 19, 2017
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.

2 participants