Top Related Projects
🐰 Rax is a progressive framework for building universal application. https://rax.js.org
开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
Essential UI blocks for building mobile web apps.
A framework in react community ✨
🌱 React and redux based, lightweight and elm-style framework. (Inspired by elm and choo)
Quick Overview
Remax is a framework for building cross-platform miniapps using React. It allows developers to create applications for multiple platforms such as WeChat, Alipay, and Toutiao using a single codebase, leveraging the power and flexibility of React.
Pros
- Cross-platform development: Build for multiple miniapp platforms with one codebase
- Familiar React ecosystem: Utilize React's component-based architecture and ecosystem
- TypeScript support: Built-in TypeScript support for improved type safety and developer experience
- Hot reloading: Faster development with hot reloading capabilities
Cons
- Learning curve: Requires knowledge of React and understanding of miniapp platforms
- Limited to miniapp ecosystems: Not suitable for native mobile or web development
- Platform-specific features: Some platform-specific features may require additional work or workarounds
- Community size: Smaller community compared to more established frameworks
Code Examples
- Creating a simple component:
import * as React from 'react';
import { View, Text } from 'remax/wechat';
export default function HelloWorld() {
return (
<View>
<Text>Hello, World!</Text>
</View>
);
}
- Using hooks for state management:
import * as React from 'react';
import { View, Button } from 'remax/wechat';
export default function Counter() {
const [count, setCount] = React.useState(0);
return (
<View>
<Text>Count: {count}</Text>
<Button onTap={() => setCount(count + 1)}>Increment</Button>
</View>
);
}
- Handling user input:
import * as React from 'react';
import { View, Input, Text } from 'remax/wechat';
export default function NameInput() {
const [name, setName] = React.useState('');
return (
<View>
<Input
type="text"
placeholder="Enter your name"
value={name}
onInput={(e) => setName(e.target.value)}
/>
<Text>Hello, {name}!</Text>
</View>
);
}
Getting Started
- Install Remax CLI:
npm install remax -g
- Create a new Remax project:
remax create my-app
cd my-app
- Start the development server:
npm run dev
- Build for production:
npm run build
For more detailed instructions and platform-specific configurations, refer to the official Remax documentation.
Competitor Comparisons
🐰 Rax is a progressive framework for building universal application. https://rax.js.org
Pros of Rax
- Broader ecosystem support, including web and native platforms
- Larger community and backing from Alibaba
- More comprehensive documentation and examples
Cons of Rax
- Steeper learning curve due to its multi-platform nature
- Less focused on WeChat mini-program development
- Potentially more complex setup for simple projects
Code Comparison
Remax (React-like syntax for WeChat mini-programs):
import * as React from 'react';
import { View, Text } from 'remax/wechat';
export default () => (
<View>
<Text>Hello, Remax!</Text>
</View>
);
Rax (Universal React-like framework):
import { createElement, render } from 'rax';
import View from 'rax-view';
import Text from 'rax-text';
function App() {
return (
<View>
<Text>Hello, Rax!</Text>
</View>
);
}
render(<App />);
Both frameworks use React-like syntax, but Rax's universal approach requires platform-specific components (e.g., rax-view
instead of View
). Remax focuses on WeChat mini-program development, while Rax aims for cross-platform compatibility, including web and native platforms.
开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
Pros of Taro
- Supports multiple frameworks (React, Vue, Nerv) and platforms (WeChat, Alipay, etc.)
- Larger community and ecosystem with more plugins and components
- More comprehensive documentation and examples
Cons of Taro
- Steeper learning curve due to its multi-framework nature
- Potentially slower build times for complex projects
- May introduce additional abstraction layers, impacting performance
Code Comparison
Taro (React):
import { View, Text } from '@tarojs/components'
function MyComponent() {
return (
<View className='my-component'>
<Text>Hello, Taro!</Text>
</View>
)
}
Remax:
import { View, Text } from 'remax/wechat'
function MyComponent() {
return (
<View className='my-component'>
<Text>Hello, Remax!</Text>
</View>
)
}
Both frameworks use similar syntax for creating components, with minor differences in import statements and available components. Taro's approach is more platform-agnostic, while Remax is more focused on specific platforms like WeChat.
Essential UI blocks for building mobile web apps.
Pros of Ant Design Mobile
- Comprehensive UI component library specifically designed for mobile applications
- Extensive documentation and community support
- Seamless integration with React and React Native projects
Cons of Ant Design Mobile
- Limited cross-platform compatibility compared to Remax
- Heavier bundle size due to the extensive component library
- Steeper learning curve for developers new to the Ant Design ecosystem
Code Comparison
Ant Design Mobile:
import { Button } from 'antd-mobile';
const MyComponent = () => (
<Button color='primary' size='large'>
Click me
</Button>
);
Remax:
import { Button } from 'remax/wechat';
const MyComponent = () => (
<Button type='primary' size='default'>
Click me
</Button>
);
While both libraries provide similar components, Remax focuses on cross-platform development for mini-programs, offering a more unified API across different platforms. Ant Design Mobile, on the other hand, provides a richer set of pre-designed components specifically tailored for mobile web and React Native applications.
Remax excels in its ability to create applications for multiple mini-program platforms using a single codebase, whereas Ant Design Mobile shines in its comprehensive mobile-first design system and extensive component library for React-based projects.
A framework in react community ✨
Pros of umi
- More comprehensive framework with built-in routing, state management, and plugins
- Supports server-side rendering and static site generation
- Larger ecosystem and community support
Cons of umi
- Steeper learning curve due to more features and complexity
- May be overkill for smaller projects or those focused solely on mini-programs
- Less specialized for cross-platform mini-program development
Code Comparison
umi (configuring routes):
export default {
routes: [
{ path: '/', component: '@/pages/index' },
{ path: '/users', component: '@/pages/users' },
],
};
Remax (defining pages):
// app.config.js
module.exports = {
pages: ['pages/index/index', 'pages/users/index'],
};
Key Differences
- Remax focuses on cross-platform mini-program development, while umi is a more general-purpose React framework
- umi provides a more opinionated structure and built-in features, whereas Remax offers more flexibility for mini-program specific requirements
- Remax uses a simpler configuration approach, while umi has more advanced configuration options for various scenarios
Both frameworks have their strengths, with umi being more suitable for complex web applications and Remax excelling in cross-platform mini-program development.
🌱 React and redux based, lightweight and elm-style framework. (Inspired by elm and choo)
Pros of dva
- Lightweight and easy-to-use Redux framework for React applications
- Integrates Redux, Redux-saga, and react-router in a cohesive package
- Supports plugin system for extending functionality
Cons of dva
- Limited to React ecosystem, not suitable for cross-platform development
- Steeper learning curve for developers unfamiliar with Redux and Redux-saga
- Less active maintenance compared to Remax
Code Comparison
dva:
import dva from 'dva';
const app = dva();
app.model({
namespace: 'count',
state: 0,
reducers: { add(state) { return state + 1; } },
});
Remax:
import * as React from 'react';
import { View, Text } from 'remax/one';
export default () => (
<View>
<Text>Hello, Remax!</Text>
</View>
);
dva focuses on state management and routing for React applications, while Remax is designed for cross-platform mini-program development. dva provides a more opinionated structure for large-scale applications, whereas Remax offers flexibility for building UIs across different platforms. The code examples highlight dva's emphasis on state management and Remax's focus on UI components.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Learn once, write anywhere
使ç¨çæ£ç React æ建å°ç¨åº
ãä½¿ç¨ React å¼åå°ç¨åºã
Remax å° React è¿è¡å¨å°ç¨åºç¯å¢ä¸ï¼è®©ä½ å¯ä»¥ä½¿ç¨å®æ´ç React è¿è¡å°ç¨åºå¼åã
- çæ£ç React - ä¸åäºéæç¼è¯çæ¹æ¡ï¼å¨ Remax ä¸ä½¿ç¨ React 没æä»»ä½éå¶ï¼å æ¬ React Hooksãä½ å¯ä»¥æ Remax ç解为é对å°ç¨åºç React Nativeã
- å¤ç«¯æ¯æ - ä½¿ç¨ Remax æ代ç 转æ¢å°å¤ä¸ªå°ç¨åºå¹³å°ã
- TypeScript - å®æ´ç TypeScript æ¯æï¼ç»ä½ 满满çå®å ¨æã
ææ¡£
ä½ å¯ä»¥ä»æ们çç½ç«ä¸æ¾å°è¯¦ç»çææ¡£ã
ä¹å¯ä»¥éè¿å¿«éå¼å§æåæ¥ç«å³ä½éª Remaxã
示ä¾
https://github.com/remaxjs/examples
è´¡ç®è
æ¥çãè´¡ç®æåã
åè®®
Top Related Projects
🐰 Rax is a progressive framework for building universal application. https://rax.js.org
开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
Essential UI blocks for building mobile web apps.
A framework in react community ✨
🌱 React and redux based, lightweight and elm-style framework. (Inspired by elm and choo)
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot