-
-
Save EmperorEarth/5b7ab163687cc3a5b3dfd24547edd821 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| We've found a bug for you! | |
| C:\code\src\git.cheung.nyc\kevin\firstRE\re\app.re | |
| 7 Γöå <Text style=Style.(style [color "#000"]) value="hello world" /> | |
| 8 Γöå <Text style=Style.(style [color "#000"]) value=(string_of_int 10) /> | |
| 9 Γöå <Test /> | |
| 10 Γöå <Greeting name="John" /> | |
| 11 Γöå </View>; | |
| This is: | |
| name::'a => | |
| ReasonReact.componentSpec | |
| int int ReasonReact.noRetainedProps ReasonReact.noRetainedProps | |
| Test.action | |
| But somewhere wanted: | |
| ReasonReact.component 'b 'c 'd (defined as | |
| ReasonReact.componentSpec 'b 'b 'c 'c 'd) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| open ReactNative; | |
| let app () => | |
| <View> | |
| <Test /> | |
| </View>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| open ReactNative; | |
| type action = | |
| | Press; | |
| let component = ReasonReact.reducerComponent "Test"; | |
| let make ::name _children => { | |
| ...component, | |
| initialState: fun () => 0, | |
| reducer: fun action state => | |
| switch action { | |
| | Press => ReasonReact.Update (state + 1) | |
| }, | |
| render: fun self => | |
| <Button | |
| onPress=(self.reduce (fun _event => Press)) | |
| title={j|Hello. You've clicked the button $self.state times(s)!|j} | |
| /*style=Style.(style [color "#000"])*/ | |
| /> | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment