This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 365
[需求]支持开发小程序组件 #368
Labels
Comments
Closed
请问如果想要创建remax的第三方UI库,就需要用到这个吧? |
不用的。这个是给原生自定义组件用的。 第三方 UI 库可以参考 https://github.com/AnnaSearl/anna-remax-ui |
目前的需求是用户能在react文件直接import我的包,但包里使用的是原生小程序的代码 @Darmody |
https://remaxjs.org/guide/custom-component Remax 本身就支持直接引入原生自定义组件 |
假设这样一个组件: import * React from 'react';
export default () => {
return <View>hello</View>;
} 编译后: import * React from 'react';
import { createComponentConfig } from 'remax';
const _component = () => {
return <View>hello</View>;
}
export default Component(createComponentConfig(_component)); 以及 由项目自己去依赖 react 和 remax。 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
新增一个
component
子命令,可以把项目构建成小程序组件:组件开发的目录结构:
. ├── packages.json ├── remax.config.js └── src ├── component.config.js └── index.js
The text was updated successfully, but these errors were encountered: