React Sketch.app Router
Render your React app as a Sketch prototype. This is currently in development, so the API is not final and production use is discouraged until a stable release.
Getting Started
-
Make sure you have Node.js and
npm
setup. -
Install this package with
npm install --save react-sketchapp-router
and refer toexamples/responsive-devices
for an example. -
Install
react-sketchapp
and make sure to use the latest@3
version.
Example
Inside react-sketchapp
's `render argument, use this:
;; const Home = <View> <Link to="/about"> <Text>Go to About</Text> </Link> </View>; const About = <View> <Link to="/"> <Text>Go to Home</Text> </Link> </View>;
Where <SketchRouter locations={['/profile/jack']}
is used to specify data for path params, e.g. /profile/:user
.
Inspiration and Code References
- react-router
- MIT License
- Copyright (c) React Training 2016-2018
- react-sketchapp
- MIT License
- Copyright (c) 2018 Airbnb