reactors
v4.2.19
Published
View components and APIs that work web, mobile and desktop!
Downloads
173
Maintainers
Readme
reactors
===
Framework based on React to build cross-platform apps that run web, mobile and desktop.
To create and run reactors apps, see reactors-cli
Install
npm install reactors
Usage
import React from 'react';
import {
ListView,
Text,
View,
} from 'reactors';
export default function MyAwesomeComponent() {
return (
<View>
<Text style={{fontWeight: 'bold'}}>One code to rule them all:</Text>
<ListView
dataSource={[
'Android',
'iPhone and iPad',
'Mac OSX',
'Ubuntu and Linux',
'Web browser',
'Windows 10',
]}
renderRow={(platform) => <Text>{platform}</Text>}
/>
</View>
);
}
View a detailed example here.
Core Components
Core APIs
Platform dependent code
You can code for a specific platform:
switch (Reactors.platform) {
case 'mobile':
// ...
break;
case 'web':
// ...
break;
case 'desktop':
// ...
break;
}
Plugins
Check out Reactors plugin in the npm
registry. Look for packages starting by reactors-
.
Some plugins: