使用真正的 React 构建小程序。
开发中,请勿用于生产环境
Remax 将完整的 React 运行在小程序环境中,让你可以使用完整的 React 能力去开发小程序。
import * as React from 'react';
import { View, Text, Button } from 'remax';
export default () => {
const [count, setCount] = React.useState(0);
return (
<View>
<Text>You clicked {count} times</Text>
<Button onClick={() => setCount(count + 1)}>
Click me
</Button>
</View>
);
}
查看完整的 Demo 示例 https://github.com/remaxjs/todo-demo