Cross-platform (React Native and Web Browser) React, React Native's UI components to re-use everywhere.
Native platforms: iOs, Android (for Mac, Windows or Linux we could just use Atom to bring our React Native code on it's web and have that same code-base run on Native environment when they got better support for React Native building block).
Browser support: Chrome, Firefox, Safari >= 7, IE 10, Edge.
"React Universal UI" is a cross-platform React's UI Kit - which could be run on both Web Browser and React Native environment, write once and use everywhere.
react-universal-ui package (no further config required)npm install --save react-universal-ui
Install and configure react-native-web using their instruction (optional, only need on Web project)
Wrap your root component under RuuiProvider
import { RuuiProvider } from 'react-universal-ui';
import App from './app';
const AppContainer = () => {
return <RuuiProvider>
<App/>
</RuuiProvider>;
};
React Universal UI come with it's own cli (command line interface), install it by..
npm install -g ruui-cli
With ruui-cli installed globally.. we should now able to use ruui command to create a new project:
ruui init SuperCoolProject
This will take a while when cli create the project structure for us as well as install necessary dependencies..
Run ruui dev under your React Universal UI project folder..
cd SuperCoolProject
ruui dev
*note: the project totally generated using react-native-cli, which mean it is a valid React Native project.. we could run it normally with:
react-native run-ios
react-native run-android
Essentially this is just a normal React Native UI Library - which absolutely work with React Native's ecosystem. Feel free to use those UI with your favorite React Native library even if you don't care about Browser yet (but believe me, you'll love it - Browser run give us tons of cool stuff).
React Native Web let us run our React Native code on Browser and React Universal UI (this project) cares about behavior of those components on Browser.
There're some differences between React Native and Web building block - such as Routing, Touch/Mouse handling... this project cares and provide support for those differences (there're helpers under utils module), which save your time and let you focus on write your Universal App.
This project is licensed under the MIT License.
This project under main support of Rooxim Company.
We're exciting to see more contribution from community, by contributing your code to ruui you agree to license your contribution under the MIT license.