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

暂不支持无状态组件 #238

Closed
zacksleo opened this issue Jul 1, 2018 · 0 comments
Closed

暂不支持无状态组件 #238

zacksleo opened this issue Jul 1, 2018 · 0 comments

Comments

@zacksleo
Copy link
Contributor

zacksleo commented Jul 1, 2018

在 render 里面 使用常量定义JSX:

    const searchbar = (
      <View>
        <View className="head">
          <Input onConfirm="search_key" className="keyword" placeholder="目的地/关键字" placeholderClass="search-place" type="text" />
        </View>
        <View className="seek">
          <Text className="seek_history">搜索历史:</Text>
          {histories}
        </View>
      </View>
    );

然后使用

{searchbar}

lint 时提示 暂不支持无状态组件

@yuche yuche closed this as completed in 13ff0eb Jul 1, 2018
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