Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ReasonML et React Native

ReasonML et React Native

Un peu de pratique pour voir comment utiliser React Native via ReasonML et les différences avec l'utilisation via JavaScript.

- http://reasonml.github.io
- https://bucklescript.github.io
- https://reasonml.github.io/reason-react/
- https://reasonml-community.github.io/reason-react-native/

Maxime Thirouin

June 18, 2019
Tweet

More Decks by Maxime Thirouin

Other Decks in Programming

Transcript

  1. @MoOx
    Reason React Native
    1

    View full-size slide

  2. @MoOx
    2
    https://moox.io/
    @MoOx
    Maxime Thirouin
    • PostCSS
    • cssnext
    • Phenomic
    • …
    Known for its contributions to…
    putaindecode.io

    View full-size slide

  3. @MoOx
    C'est qui Reason(ML)
    et qu'est ce qu'il fait là?
    4
    Previously in React Toulouse…

    View full-size slide

  4. @MoOx
    5
    add(1, 1); // 2
    add(1, "1"); // "11"
    add(1, null); // 1
    add(1, undefined); // NaN

    JS

    View full-size slide

  5. @MoOx
    7
    • ESLint?
    • Flow?
    • TypeScript?

    View full-size slide

  6. @MoOx
    1. A language
    2. A syntax
    3. A compiler
    4. An ecosystem
    10
    RE

    View full-size slide

  7. @MoOx
    RE
    11
    JS
    BuckleScript

    View full-size slide

  8. @MoOx
    12
    Creator of React
    Jordan Walke wrote the
    first React prototype in
    SML
    & ReasonML
    Ocaml friend

    View full-size slide

  9. @MoOx
    React Native?
    14

    View full-size slide

  10. @MoOx
    bs-react-native
    16

    View full-size slide

  11. @MoOx
    17
    bs-react-native

    View full-size slide

  12. @MoOx
    Reason React Native
    19

    View full-size slide

  13. @MoOx
    reason-react-native
    20

    View full-size slide

  14. @MoOx
    Zero-cost
    23
    bs-react-native View vs reason-react-native View
    bs-react-native Style vs reason-react-native Style
    bs-react-native Platform vs reason-react-native Platform
    reason-react-native

    View full-size slide

  15. @MoOx
    Wanna try?
    24
    npm install -g react-native-cli
    react-native init MyApp --template reason
    Cd MyApp
    yarn add bs-platform --dev
    react-native run-ios
    reason-react-native

    View full-size slide

  16. @MoOx
    25
    reason-react-native 0.x.*
    should work with
    react-native@^0.x.*.
    reason-react-native

    View full-size slide

  17. @MoOx
    SHOWTIME
    26
    reason-react-native

    View full-size slide

  18. @MoOx
    https://reasonml-
    community.github.io/
    reason-react-native/en/
    docs/cheatsheet/
    https://reasonml-community.github.io/
    reason-react-native/en/docs/
    cheatsheet/
    27
    reason-react-native

    View full-size slide

  19. @MoOx
    28
    Questions ?
    https://moox.io/
    @MoOx
    Maxime Thirouin

    View full-size slide