Hello React hooks

Hello React hooks

water-cell tech night #2で話したreact hooksの紹介スライドです。

D8eb514404fbca5bd485040edccdbe30?s=128

Matsui Masashi

November 30, 2018
Tweet

Transcript

  1. ハロー リアクト フック @circled9 2018-11-30 WCI Tech night #2

  2. Matsui Masashi দҪਖ਼ࢤ DJSDMFE 'SPOUFOE&OHJOFFS !XBUFSDFMMJOD !2

  3. ࠓ೔঺հ͢Δͷ͸ 3FBDUWͷ৽ػೳ !3

  4. )PPLT"1* !4

  5. Hooks are a new feature proposal that lets you use

    state and other React features without writing a class. They’re currently in React v16.7.0-alpha and being discussed in an open RFC. IUUQTSFBDUKTPSHEPDTIPPLTSFGFSFODFIUNMΑΓҾ༻ !5
  6. ҙ༁ w )PPLT͸3FBDUͷ࣍ͷόʔδϣϯ Ͱ࢖͑Δ༧ఆͷ΍ͭ w DMBTTͳ͠ͰTUBUFͱ͔͕࢖͑Δ w ·ͩ3'$ͳײ͡Ͱ࢓༷ࡦఆத !6

  7. /P#SFBLJOH$IBOHFT w ࢖͏ͷ͸೚ҙͩ͠ޙํޓ׵ੑͱ͔͸ Ϳͬյ͞ͳ͍Α w ผʹDMBTTΛͳ͘͢ؾ΋ͳ͍Α w 3FBDUͷߟ͑ํ΍ίϯηϓτͱ͔͸ มΘΒͳ͍Α !7

  8. )PPLT"1*ͷ঺հ !8

  9. ࠓ೔঺հ͢Δ΋ͷ w VTF4UBUF w VTF&GGFDU w VTF3FEVDFS !9

  10. ࠓ೔঺հ͠ͳ͍΋ͷ w VTF$POUFYU w ଞɺ"EEJUJPOBM)PPLTͷେ൒ w VTF$BMMCBDL VTF.FNP  VTF3FG

    FUD !10
  11. VTF4UBUF w TUBUF͕࢖͑Δ w ݱࡏͷঢ়ଶͱঢ়ଶΛม͑Δؔ਺Λฦ ͢ w چདྷͷTFU4UBUFͷΑ͏ʹΦϒδΣ ΫτͷϚʔδ͸͠ͳ͍ͷͰ஫ҙ !11

  12. VTF&GGFDU w ඳը͕ऴΘ͔ͬͯΒ࣮ߦ͞ΕΔ w %JE.PVOU΍%JE6QEBUFʹ͍ۙ w ୈೋҾ਺Ͱ؂ࢹ͢Δର৅Λࢦఆ͢Δ w ୈҰҾ਺ͷฦΓ஋ͷؔ਺ͰΫϦʔϯ Ξοϓ͢Δ

    !12
  13. VTF3FEVDFS w 'MVYϥΠΫͳ͜ͱ͕Ͱ͖Δ !13

  14. ॴײ w SFDPNQPTF΍SFEVYͳͲΛ࢖ͬ ͯ΍ͬͯͨ͜ͱͷҰ෦͸3FBDU͚ͩ ͰͰ͖ͦ͏ w ͠͹Β͘͸ϕετϓϥΫςΟεΛ໛ ࡧ͢Δ͜ͱʹͳΓͦ͏ !14

  15. &OKPZ)PPLT !15