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

React Hooks公開から1年で得られた知見

soso
April 28, 2020

React Hooks公開から1年で得られた知見

soso

April 28, 2020
Tweet

More Decks by soso

Other Decks in Technology

Transcript

  1. 3FBDU)PPLTެ։͔Β̍೥ͰಘΒΕͨ஌ݟ

    View full-size slide

  2. ϓϩϑΟʔϧ
    ੢ଜ૘ʢχγϜϥι΢ʣ
    wϑϩϯτΤϯυΤϯδχΞ
    εΩϧ
    w5ZQF4DSJQU
    w3FBDU
    w3FBDU/BUJWF
    w"84
    झຯ
    wғޟ

    View full-size slide

  3. ΞδΣϯμ
    w3FBDU)PPLT֓ཁ
    w(FNDPPLͷίϯϙʔωϯτͱ)PPLTͷྺ࢙
    w·ͱΊ

    View full-size slide

  4. 3FBDU)PPLT֓ཁ

    View full-size slide

  5. 3FBDU)PPLTͱ͸ʁ
    w3FBDUҎ߱Ͱར༻Մೳ
    wؔ਺ίϯϙʔωϯτͰར༻Մೳͳ"1*Λఏڙ

    View full-size slide

  6. ͳͥؔ਺ίϯϙʔωϯτͳͷ͔ʁ
    w͔͠͠ɺ)PPLTొ৔Ҏલ͸TUBUFΛ࣋ͭ͜ͱ͕Ͱ͖ͳ͔ͬͨ
    wΫϥείϯϙʔωϯτ͸$MBTTߏจ͕ඞཁͳͨΊɺෳࡶʹͳΓ͕ͪ
    wؔ਺ίϯϙʔωϯτ͸ͦͷ··ؔ਺ͳͷͰɺඇৗʹγϯϓϧ
    wUIJT΍CJOEͳͲɺಠಛͳߏจΛҙࣝ͠ͳ͍ͱ͍͚ͳ͍

    View full-size slide

  7. 3FBDU)PPLTͷϝϦοτ
    w)PPLTͷొ৔Ͱؔ਺ίϯϙʔωϯτ͕ߴػೳʹ
    wؔ਺ίϯϙʔωϯτͰݟ௨͠ͷྑ͍ίʔυ͕ॻ͚Δ
    wίϯϙʔωϯτؒͷϩδοΫΛ࠶ར༻Ͱ͖Δ
    wෳࡶʹͳΓ͕ͪͳϥΠϑαΠΫϧΠϕϯτ΋࠶ར༻Մ
    w6*ͱϩδοΫΛ੾Γ෼͚Δ͜ͱ͕Մೳ

    View full-size slide

  8. جຊతͳ)PPL
    wVTF4UBUF
    wίϯϙʔωϯτʹঢ়ଶΛ෇༩͢Δ
    wVTF&⒎FDU
    wϥΠϑαΠΫϧΠϕϯτͷ؅ཧ
    wVTF$POUFYU
    wίϯςΩετͷ஋Λࢀর

    View full-size slide

  9. (FNDPPLͷίϯϙʔωϯτͱ)PPLTͷྺ࢙

    View full-size slide

  10. (FNDPPLͷίϯϙʔωϯτͷྺ࢙
    Ϋϥείϯϙʔωϯτ
    ؔ਺ίϯϙʔωϯτ3FDPNQPTF
    ؔ਺ίϯϙʔωϯτ)PPLT

    View full-size slide

  11. 3FDPNQPTFͷ࠾༻
    w3FDPNQPTF͸ؔ਺ίϯϙʔωϯτʹঢ়ଶͷ෇༩΍ɺ
    ϥΠϑαΠΫϧͷ࣮ߦͳͲͷػೳΛ༩͑Δ)0$ϥΠϒϥϦ
    w3FDPNQPTFͷ࠾༻ʹΑͬͯɺΫϥείϯϙʔωϯτΛ
    ɹॻ͘ඞཁ͕ແ͘ͳͬͨʂ

    View full-size slide

  12. 3FDPNQPTFͷਏ͍ॴ
    w3FDPNQPTF͸)0$Λଟ༻͢ΔͨΊɺίϯϙʔωϯτͷ
    ɹ֊૚͕ෳࡶԽ͠ɺσόοά͕΍Γʹ͘͘ͳͬͨ
    wίϯϙʔωϯτʹͭTUBUFΛఆٛ͢Δ͚ͩͰ΋)0$Λ
    ɹ࢖͏ඞཁ͕͋ΓɺίϯϙʔωϯτͷෳࡶԽ͕ਐΜͩ

    View full-size slide

  13. )PPLTͷొ৔
    w)PPLTΛ࢖༻ͯ͠ɺΧελϜϑοΫΛ࡞੒͢Δ͜ͱͰ
    ɹίϯϙʔωϯτ಺ͷϩδοΫ͕࠶ར༻Ͱ͖ΔΑ͏ʹͳͬͨ
    wTUBUFͷ؅ཧʹ)0$Λ࢖͏ඞཁ͕ͳ͘ͳΓɺ
    ɹγϯϓϧͳίϯϙʔωϯτͷߏ੒ʹͰ͖ͨ
    wQSPQTͷόέπϦϨʔͷ࡟ݮ

    View full-size slide

  14. ͜Ε͔Βͷ)PPLT
    w)PPLTҎલ͸ίϯϙʔωϯτΛ࠶ར༻͍ͯͨ͠
    w)PPLTҎ߱͸ϩδοΫΧελϜϑοΫΛ࠶ར༻Ͱ͖Δ
    wίϯϙʔωϯτͷϩδοΫͷΈΛڞ௨ԽͰ͖Δ
    wΧελϜϑοΫΛఏڙ͢ΔϥΠϒϥϦ͕ओྲྀʹ

    View full-size slide

  15. )PPLTΛ༻͍ͨϥΠϒϥϦୡ
    wSFBDUVTF
    wελʔ਺ສ௒͑ͷ)PPLTϥΠϒϥϦ
    wSFBDUUBCMF
    w7FSҎ͔߱Β)PPLTରԠͨ͠ςʔϒϧϥΠϒϥϦ
    w'PSNJL
    w7FSҎ͔߱Β)PPLTରԠͨ͠ϑΥʔϜϥΠϒϥϦ

    View full-size slide

  16. ࠓ೔ͷ·ͱΊ
    w)PPLTͷొ৔Ͱؔ਺ίϯϙʔωϯτ͕ओྲྀʹͳͬͨ
    w)PPLTΛ࢖༻͢Δ͜ͱͰίϯϙʔωϯτؒͷϩδοΫΛ
    ɹڞ௨ԽͰ͖Δ
    w͜Ε͔Β͸ΧελϜϑοΫΛఏڙ͢ΔϥΠϒϥϦ͕ओྲྀʹ

    View full-size slide

  17. ͝ࢹௌ͋Γ͕ͱ͏͍͟͝·ͨ͠

    View full-size slide