You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 670bd31
Browse filesBrowse the repository at this point in the historyBrowse files
It's great of you to consider contributing to the BuckleScript bindings for React Native. **Every contribution is greatly appreciated!**
4
-
There are many ways to contribute. Besides implementing new features and fixing bugs, you can give advice in issues, create and improve documentation, etc.
3
+
It's great of you to consider contributing to the BuckleScript bindings for
4
+
React Native. **Every contribution is greatly appreciated!** There are many ways
5
+
to contribute. Besides implementing new features and fixing bugs, you can give
6
+
advice in issues, create and improve documentation, etc.
5
7
6
8
## I want to contribute a missing component or API
7
9
8
-
That's awesome!. If you have a specific one in mind go for it, otherwise just pick one of your choice.
9
-
If you expect that it would take you a while (which is no problem) you can open a PR with your working progress to let everybody know you are working on it.
10
-
To add component (or API) you should do the following steps:
10
+
That's awesome!. If you have a specific one in mind go for it, otherwise just
11
+
pick one of your choice. If you expect that it would take you a while (which is
12
+
no problem) you can open a PR with your working progress to let everybody know
13
+
you are working on it. To add component (or API) you should do the following
14
+
steps:
11
15
12
16
- Implement your component in a file `myComponentRe.re`
13
-
- Add an interface `myComponentRe.rei` and think about which things should be exposed.
14
-
- Add your new component to `reactNative.re` following the existing components / APIs.
17
+
- Add an interface `myComponentRe.rei` and think about which things should be
18
+
exposed.
19
+
- Add your new component to `reactNative.re` following the existing components /
20
+
APIs.
15
21
16
22
Some things to keep in mind:
17
23
18
-
- We strive for more heavy bindings, i.e. we try to hide things like `Js.t` objects, but sometimes this is not possible.
19
-
- String enums, which are an argument to a function, are represented through polymorphic variants.
24
+
- We strive for more heavy bindings, i.e. we try to hide things like `Js.t`
25
+
objects, but sometimes this is not possible.
26
+
- String enums, which are an argument to a function, are represented through
27
+
polymorphic variants.
20
28
- You should format your code with `refmt`.
21
29
22
30
## I got stuck
23
31
24
-
Well, that happens. But don't give up! Just join the [Discord Server](https://discord.gg/reasonml) and ask your questions in #react or #bucklescript. Everybody is really welcoming and helpful!
32
+
Well, that happens. But don't give up! Just join the
33
+
[Discord Server](https://discord.gg/reasonml) and ask your questions in #react
34
+
or #bucklescript. Everybody is really welcoming and helpful!
25
35
26
36
## Setup Development
27
37
@@ -35,7 +45,8 @@ Then build with `yarn start`.
35
45
36
46
## Running example
37
47
38
-
Example app is written in Expo. Please check their documentation for any additional details. Before running the app, make sure to build the Reason code.
48
+
Example app is written in Expo. Please check their documentation for any
49
+
additional details. Before running the app, make sure to build the Reason code.
39
50
40
51
```sh
41
52
cd ./example
@@ -50,16 +61,22 @@ yarn start
50
61
51
62
## Running docs
52
63
53
-
Documentation is generated from the Reason interface and comments that are included there.
64
+
Documentation is generated from the Reason interface and comments that are
65
+
included there.
54
66
55
67
To start working with documentation:
56
68
57
-
- Ensure that have [opam](http://opam.ocaml.org/doc/Install.html) & use `opam switch create 4.02.3+buckle-master`.
69
+
- Ensure that have [opam](http://opam.ocaml.org/doc/Install.html) & use
70
+
`opam switch create 4.02.3+buckle-master`.
58
71
- Ensure that have [odoc](https://github.com/ocaml/odoc) installed.
59
-
> if you have a problem during installing the odoc with OCaml dependencies, try: `opam pin add odoc.dev git+https://github.com/ocaml/odoc`
60
-
- build code with: `yarn build` or if you want to build with watch then use: `yarn start`
61
-
- start docs server using: `yarn docs:start`. Script will run the HTTP server and reload after something changes.
62
-
- To build documentation from ReasonMl interfaces to HTML file run: `yarn docs:build`
72
+
> if you have a problem during installing the odoc with OCaml dependencies,
This generates the OCaml variant of the interface file. To obtain a reason interface you can copy it into [Reason Tools](https://reasonml.github.io/reason-tools/popup.html) or pipe it to `refmt` with
91
+
This generates the OCaml variant of the interface file. To obtain a reason
92
+
interface you can copy it into
93
+
[Reason Tools](https://reasonml.github.io/reason-tools/popup.html) or pipe it to
94
+
`refmt` with
75
95
76
96
```sh
77
97
refmt --parse ml --interface true
@@ -81,4 +101,6 @@ refmt --parse ml --interface true
- The [React Native docs](https://facebook.github.io/react-native/)
84
-
- The [TypeScript definitions](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-native/index.d.ts) are really useful if the docs aren't that clear about the signature of an API.
0 commit comments