importReact,{Component}from'react';importTextfrom'react-platformula/text';exportdefaultclassHelloWorldextendsComponent{render(){return(<Text>
Hello World
</Text>);}}
Easy usage of svg, fonts and sounds, no more manual linking! 🔥🔥
importReact,{Component}from'react';importBlockfrom'react-platformula/block';import{getCustomasgetCustomText}from'react-platformula/text';importpunkFontFamilyfrom'./punk-font.ttf';importlightTapfrom'./light-tap.mp3';importgetCustomSmileyfrom'./smiley.svg';constCustomText=getCustomText({fontFamily: punkFontFamily,fontSize: 30,color: 'red',});constCustomSmiley=getCustomSmiley({width: 20,height: 20,fill: 'blue',});exportdefaultclassButtonextendsComponent{handlePress(){lightTap.play();}render(){const{ text }=this.props;return(<BlockonPress={()=>this.handlePress()}><CustomSmiley/><CustomText>
Click me for sound
</CustomText></Block>);}}
Uses webpack with a single and easy configure file, you can add support for typescript, flow or whatever you like!
Use .web, .ios, .android extensions (or any of the globals __WEB__, __IOS__, __ANDROID__) to write code for a specific platform.
Installation
Make sure you installed react-native's dependencies (such as java, xcode) check their tutorial if needed.
run npm i (or yarn).
You are now ready to use the boilerplate!
to make it your own do the fellowing steps
npm run create:android:release - Create release APK.
npm run build[:web][:ios][:android] - To make a minified build, needed for web and ios. As for android it is already used within create:android:release.
About
Start developing a cross platform native app and website!