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

fix: export default rax and rax.Children #332

Merged
merged 1 commit into from Sep 15, 2017
Merged

Conversation

xcodebuild
Copy link
Contributor

rax 目前没有 export default,当用户在 webpack 中配置 alias 使用 rax 替代 react 时,原有的

import React from 'react';

往往不能运行。

import React from 'react';
import Rax from 'rax';

import { createElement } from 'rax';

console.log(React); // React
console.log(Rax);  // undefined
console.log(React.Children); // React.Children

console.log(createElement); // rax.createElement

https://www.webpackbin.com/bins/-KtjqtZKIyTSU6Lp7QKb

同时直接使用 React.Children.only 等函数的代码也无法使用

Copy link
Collaborator

@yuanyan yuanyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@yuanyan yuanyan merged commit 5f028c5 into alibaba:master Sep 15, 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.

None yet

2 participants