Skip to content

Commit 88d3a84

Browse files
committed
Update install instruction + link to example
1 parent bbdd9c3 commit 88d3a84

File tree

2 files changed

+3
-70
lines changed

2 files changed

+3
-70
lines changed

docs/example.md

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -33,66 +33,10 @@ export { app as default } from "./src/App.bs.js";
3333

3434
## `./src/App.re`
3535

36-
👀 In place of the rudimentary example below, you can directly grab the
37-
[App.re](https://raw.githubusercontent.com/reason-react-native/reason-react-native/master/reason-react-native-template/template/src/App.re)
36+
Please directly grab the
37+
[App.re](https://github.com/reason-react-native/template/blob/master/template/src/App.re)
3838
of our template, which will match React Native default _Hello World_!
3939

40-
```reason
41-
open ReactNative;
42-
43-
/*
44-
Here is StyleSheet that is using Style module to define styles for your components
45-
The main different with JavaScript components you may encounter in React Native
46-
is the fact that they **must** be defined before being referenced
47-
(so before actual component definitions)
48-
More at https://reasonml-community.github.io/en/docs/apis/Style/
49-
*/
50-
let styles =
51-
Style.(
52-
StyleSheet.create({
53-
"container":
54-
style(
55-
~flex=1.,
56-
~justifyContent=`center,
57-
~alignItems=`center,
58-
~backgroundColor="#F5FCFF",
59-
(),
60-
),
61-
"welcome":
62-
style(~fontSize=20., ~textAlign=`center, ~margin=10.->dp, ()),
63-
"instructions":
64-
style(~textAlign=`center, ~color="#333333", ~marginBottom=5.->dp, ()),
65-
})
66-
);
67-
68-
[@react.component]
69-
let app = () =>
70-
<View style=styles##container>
71-
<Text style=styles##welcome>
72-
"Welcome to (Reason) React Native!"->React.string
73-
</Text>
74-
<Text style=styles##instructions>
75-
"To get started, edit src/App.re"->React.string
76-
</Text>
77-
<Text style=styles##instructions>
78-
{switch (Platform.os) {
79-
/*
80-
Instructions depends on the platform this code will run on
81-
More at https://reasonml-community.github.io/en/docs/apis/Platform/
82-
*/
83-
| os when os == Platform.ios =>
84-
"Press Cmd+R to reload,\n" ++ "Cmd+D or shake for dev menu"
85-
| os when os == Platform.android =>
86-
"Double tap R on your keyboard to reload,\n"
87-
++ "Shake or press menu button for dev menu"
88-
| os when os == Platform.web => "Press Cmd+R to reload."
89-
| _ => ""
90-
}}
91-
->React.string
92-
</Text>
93-
</View>;
94-
```
95-
9640
### Differences with React Native JavaScript
9741

9842
Beside Reason syntax that is a bit different with JavaScript, you may have

docs/install.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,10 @@ When you have correctly
3333
installed, you can run the following command:
3434

3535
```console
36-
npx react-native init MyApp --template reason-react-native-template
36+
npx @react-native-community/cli init --template @reason-react-native/template
3737
cd MyApp
3838
```
3939

40-
⚠️ In case you got an error saying it's looking for
41-
`react-native-template-reason-react-native-template`, be sure to have
42-
uninstalled any previous react-native-cli version & rely on `npx`
43-
44-
```console
45-
npm -g uninstall react-native
46-
npm -g uninstall react-native-cli
47-
yarn global remove react-native
48-
yarn global remove react-native-cli
49-
```
50-
5140
💖 Your project is setup, you can just check
5241
[how to use _Reason React Native_](/en/docs/usage/) right
5342
away!

0 commit comments

Comments
 (0)