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

The Power of ReSwift !!

The Power of ReSwift !!

Research ReSwift with creating demo app.

9e64d2069945742c818421e884603b44?s=128

shunsuke sato

May 09, 2016
Tweet

More Decks by shunsuke sato

Other Decks in Programming

Transcript

  1. The Power of ReSwift !! ZJEFWୈճษڧձ

  2. ࣗݾ঺հ w !VTIJTBOUPBTPCV w גࣜձࣾϑϯβॴଐ w J04"OESPJE+BWB4DSJQU w ϑοταϧίʔώʔ

  3. ֓ཁ 3F4XJGUΛ࣮ϓϩμΫτʹ࠾༻ͨ͠ͱ͖ʹΠέΔͷ͔ ͦͷௐࠪใࠂΈ͍ͨͳײ͡

  4. ൃද͢Δʹ͋ͨͬͯ΍ͬͨ͜ͱ w ͦΕͬΆ͍σϞΞϓϦΛͭ͘Δ w ʮૉʯͷͭ͘ΓͰͭ͘Δ w 3F4XJGUͰϦϓϨΠε͢Δ w 3F4XJGUͷύϫʔͱ͔Λײ͡Δ

  5. ΞδΣϯμ w 3F4XJGU֓ཁ w ͭͬͨ͘σϞΞϓϦέʔγϣϯͷ؆୯ͳ঺հ w 3F4XJGUΛ༻͍ͨΞϓϦέʔγϣϯͷ࡞Γํ w 3F4XJGUͷΤίγεςϜ w

    ʢࣗ෼ͷײͨ͡ʣ3F4XJGUΛ࢖ͬͯΈͯͷࢥ͏͜ͱ
  6. ʲ൵ใʳҎԼͷࢿྉಡΜͩ΄͏͕ྑ͍ͱࢥΘΕΔ w IUUQOJOKJOLVOIBUFOBCMPHDPNFOUSZ w IUUQTTQFBLFSEFDLDPNOJOKJOLVOSFBDUJWFTXJGUNFFUVQ

  7. w IUUQTHJUIVCDPN3F4XJGU3F4XJGU w 3F4XJGU3FEVYͷ4XJGU൛ 3F4XJGU֓ཁ

  8. 3FEVYͱ͸ʁʁ w 3FEVY'MVY࣮૷ͷ͏ͪͷ̍ͭ w 'MVYσʔλϑϩʔʹؔ͢ΔʮΞʔΩςΫνϟʯ w 3FBDU+48FCΞϓϦέʔγϣϯͷʮϏϡʔʯϥΠϒϥϦ

  9. 3FEVYͱ͸ʁʁ ʢ˞͜ͷਤ͸3F4XJGUͷϖʔδΑΓʣ

  10. 3FEVYͱ͸ʁʁ w ొ৔ਓ෺"DUJPO4UPSF3FEVDFS w 6OJEJSFDUJPOBMEBUBqPX w 4JOHMF4UBUF5SFF ʢ˞͜ͷਤ͸3F4XJGUͷϖʔδΑΓʣ

  11. ొ৔ਓ෺"DUJPO4UPSF3FEVDFS w "DUJPO w 4UPSFʢ˞ਤ͔Β͸Θ͔ΓͮΒ͍͚Ͳɺ͜Ε͚ͩγϯάϧτϯʂʂʣ w 3FEVDFS ʢ˞͜ͷਤ͸3F4XJGUͷϖʔδΑΓʣ

  12. 6OJEJSFDUJPOBMEBUBqPX

  13. 7JFX͕4UPSFʢ4UBUFʣΛߋ৽ͨ͠Γ͸͠ͳ͍ 6OJEJSFDUJPOBMEBUBqPX No!!!

  14. ΞϓϦέʔγϣϯͷঢ়ଶ͸̍ͭͷ4UBUFʹू໿͞ΕΔ 4JOHMF4UBUF5SFF

  15. ʢ੔ཧʣ3F4XJGUͱ͸ʁʁ ΞϓϦέʔγϣϯͷʮঢ়ଶʯʹ੍໿Λ΋ͨΒ͢ϑϨʔϜϫʔΫͰɺ w σʔλϑϩʔ͕୯Ұํ޲ w ΞϓϦέʔγϣϯͷঢ়ଶ͕̍Օॴʹू໿͞ΕΔ ͱ͍͏ಛ௃Λ΋ͭ

  16. ͭͬͨ͘σϞΞϓϦέʔγϣϯͷ؆୯ͳ঺հ w ͦΕͳΓͷن໛ʢ7JFX$POUSPMMFSͷ਺ʣ w 5BCMF7JFXΈ͍ͨͳϦετදࣔ w ൚༻తͳ7JFX w ϑΥʔϜΆ͍΋ͷ w

    QVTI7JFX$POUSPMMFSQSFTFOU7JFX$POUSPMMFS w ௨৴ॲཧʢࠓճ͸μϛʔ͚ͩͲʣ w ΞϥʔτɺϩʔσΟϯά
  17. αϯϓϧΞϓϦʹ͍ͭͯ

  18. αϯϓϧΞϓϦʹ͍ͭͯ w 3F4XJGU͕ͲΜͳ΋ͷ͔Λ஌Δʹ͸͜ΕͰ͍͍ w 3F4XJGUͷΤίγεςϜʢ3F4XJGU3PVUFS3FDPSEFSʣΛ஌Δ ͷ΋͜ΕͰ͍͍ w ͦΕͳΓͷن໛ʹͳͬͨͱ͖ͷ3F4XJGUͷάουύλʔϯͩͱ͔ ʮπϥϛʯͱ͔͸Θ͔Βͳͦ͏

  19. 3F4XJGUΛ༻͍ͨΞϓϦέʔγϣϯͷ࡞Γํ

  20. σʔλϑϩʔΛҰ௨ΓΈͯΈΔ w 4UBUFΛมߋ͍ͨ͠ w 4UBUF͕ͲͷΑ͏ʹมߋ͞ΕΔ͔ w 4UBUF͕Ϗϡʔʹ൓ө͞ΕΔ

  21. σʔλϑϩʔΛҰ௨ΓΈͯΈΔ 4UBUFΛมߋ͍ͨ͠

  22. σʔλϑϩʔΛҰ௨ΓΈͯΈΔ 4UBUF͕ͲͷΑ͏ʹมߋ͞ΕΔ͔

  23. σʔλϑϩʔΛҰ௨ΓΈͯΈΔ 4UBUF͕Ϗϡʔʹ൓ө͞ΕΔ

  24. σʔλϑϩʔΛҰ௨ΓΈͯΈΔ w 4UBUFΛมߋ͍ͨ͠ w 4UBUF͕ͲͷΑ͏ʹมߋ͞ΕΔ͔ w 4UBUF͕Ϗϡʔʹ൓ө͞ΕΔ

  25. 4UBUFΛมߋ͍ͨ͠

  26. 4UBUFΛมߋ͍ͨ͠ 4UPSF͕"DUJPOΛEJTQBUDI͢Δ

  27. σʔλϑϩʔΛҰ௨ΓΈͯΈΔ w 4UBUFΛมߋ͍ͨ͠ w 4UBUF͕ͲͷΑ͏ʹมߋ͞ΕΔ͔ w 4UBUF͕Ϗϡʔʹ൓ө͞ΕΔ

  28. 4UBUF͕ͲͷΑ͏ʹมߋ͞ΕΔ͔

  29. 4UBUF͕ͲͷΑ͏ʹมߋ͞ΕΔ͔ 3FEVDFS͕ରԠ͢Δ"DUJPOຖʹ4UBUFΛߋ৽͢Δ

  30. σʔλϑϩʔΛҰ௨ΓΈͯΈΔ w 4UBUFΛมߋ͍ͨ͠ w 4UBUF͕ͲͷΑ͏ʹมߋ͞ΕΔ͔ w 4UBUF͕Ϗϡʔʹ൓ө͞ΕΔ

  31. 4UBUF͕Ϗϡʔʹ൓ө͞ΕΔ

  32. 4UBUF͕Ϗϡʔʹ൓ө͞ΕΔ 4UPSF͕7JFX$POUSPMMFSΛTVCTDSJCF͢ΔɺϏϡʔͷߋ৽͸ϦΞΫςΟϒʹ

  33. ͦΕͧΕͷొ৔ਓ෺ͷத਎ΛΈ͍ͯ͘ w "DUJPO w 4UPSF w 3FEVDFS w 7JFX 7JFX$POUSPMMFS

  34. "DUJPO

  35. "DUJPO w 4UBUFมߋ࣌ʹૹΒΕΔ΋ͷ w ͨͩͷʮ৘ใʢσʔλʣʯ w ࣗ਎ͱͯ͠͸ͱ͘ʹͳʹ΋͠ͳ͍ʢʮۭʯͷϓϩτίϧͰ΋͋Δʣ

  36. 4UPSF

  37. 4UPSF w 4UPSF͸ΞϓϦέʔγϣϯͷγϯάϧτϯ w 4UPSF͕"DUJPOΛEJTQBUDI͢Δ w 4UPSF͕อ͍࣋ͯ͠Δ4UBUF͕ΞϓϦέʔγϣϯͷঢ়ଶ

  38. 3FEVDFS

  39. 3FEVDFS w 3FEVDFS͸4UBUFΛͲͷΑ͏ʹߋ৽͢Δ͔ͷΈΛ୲͏ w 3FEVDFS͸ͨͩͷ'VODUJPO w "DUJPOͷܕʹΑͬͯॲཧ෼͚

  40. 7JFX 7JFX$POUSPMMFS

  41. 7JFX 7JFX$POUSPMMFS 4UPSF4VCTDSJCFSϓϩτίϧΛDPOGPSN͢Δ

  42. 7JFX 7JFX$POUSPMMFS 4UPSF4VCTDSJCFSϓϩτίϧͰఆٛ͞Ε͍ͯΔOFX4UBUFϝιουΛ࣮૷͢Δ

  43. 7JFX 7JFX$POUSPMMFS OFX4UBUFϝιου಺ʹɺ4UBUFʹରͯ͠7JFX͕ͲͷΑ͏ʹදࣔ͞ΕΔ͔Λએݴతʹॻ͘

  44. 7JFX 7JFX$POUSPMMFS 4UPSFͷTVCTDSJCFVOTVCTDSJCFͷॲཧΛॻ͘

  45. 7JFX 7JFX$POUSPMMFS 4UBUFΛߋ৽͍ͨ͠ͱ͖͸ɺͦΕʹରԠͨ͠"DUJPOΛEJTQBUDI͢Δ

  46. 7JFX 7JFX$POUSPMMFS 4UPSFͷ4UBUFΛ௚઀͍͡Βͳ͍ʂʂ No!!!

  47. 3F4XJGUͷΤίγεςϜ w 3F4XJGU3PVUFS w 3F4XJGU3FDPSEFS

  48. 3F4XJGU3PVUFS w 3F4XJGUͰ͸ΞϓϦέʔγϣϯͷঢ়ଶΛશͯ؅ཧ͍ͨ͠ w J04ʹ͓͚ΔʮϧʔςΟϯάʯ΋4UBUFͷ̍ͭ w ϝϦοτ3F4XJGU3FDPSEJOHͷͱ͜ΖͰ

  49. 3F4XJGU3PVUFSద༻֓ཁ ͜͜Ͱ͸͍ͩͿলུͯ͠EJTQBUDIͷॲཧͷΈʢଞʹઃఆ͕݁ߏखؒͩͬͨΓ͢Δʣ

  50. 3F4XJGU3PVUFSద༻֓ཁ ্ͷSPVUF͸ͨͩͷจࣈྻͷ഑ྻ63-తͳѻ͍ʢzTPNFIPHFzʣɺ͍ͦͭΛ1BZMPBEʹ͢Δ

  51. 3F4XJGU3FDPSEFS w "DUJPOͷཤྺΛه࿥ w ͦΕ͸ͭ·Γɺ͢΂ͯͷ࣌఺Ͱͷ4UBUFΛ࠶ݱͰ͖Δͱ͍͏͜ͱ w λΠϜτϥϕϧʢ6OEP3FEPʣ w ։ൃ࣌ͷঢ়ଶ࠶ݱ w

    "DUJPO͸4UBOEBSE"DUJPO$POWFSUJCMFʹϦϓϨΠε͢Δඞཁ༗ w 4FU3PVUF4QFDJpD%BUB͕བྷΉͱݱঢ়೉͍͠ʁʁ
  52. w ΞϓϦέʔγϣϯͷঢ়ଶ͕̍Օॴʹू໿͞ΕΔʂʂ w 3F4XJGUͷ4UBUFͱͯ͠ѻ͑ͳ͍ʮঢ়ଶʯ͕͋Δ w ࠩ෼ߋ৽ w 4UBUFͷ෼ׂͷ࢓ํ w ଞίʔυྔ͕૿͑Δʢ৑௕ʣɺϦηοτॲཧ

    3F4XJGU͞ΘͬͯΈͯײͨ͜͡ͱ·ͱΊ
  53. ΞϓϦέʔγϣϯͷঢ়ଶ͕̍Օॴʹू໿͞ΕΔʂʂ ·ͣʢ͜Ε·Ͱ͓ͦΒ͘ଘࡏͨ͠Ͱ͋Ζ͏ʣ7JFX$POUSPMMFS಺ͷঢ়ଶม਺͸Ұ੾ͳ͘ͳΔ

  54. ΞϓϦέʔγϣϯͷঢ়ଶ͕̍Օॴʹू໿͞ΕΔʂʂ 4UPSF͕͢΂ͯΛ஌͍ͬͯΔɻ4UPSF͸ʮਆʯ

  55. 3F4XJGUͷ4UBUFͱͯ͠ѻ͑ͳ͍ʮঢ়ଶʯ͕͋Δ w Ξχϝʔγϣϯ w 6*"MFSU$POUSPMMFS w ΩʔϘʔυͷදࣔඇදࣔ w αʔυύʔςΟͷϥΠϒϥϦʢྫ͑͹z471SPHSFTT)6%zʣ

  56. 3F4XJGUͷ4UBUFͱͯ͠ѻ͑ͳ͍ʮঢ়ଶʯ͕͋Δ w Ξχϝʔγϣϯ w 6*"MFSU$POUSPMMFS w ΩʔϘʔυͷදࣔඇදࣔ w αʔυύʔςΟͷϥΠϒϥϦʢྫ͑͹z471SPHSFTT)6%zʣ w

    ࠓճͷσϞΞϓϦέʔγϣϯͰ͸ɺΧελϜΞϥʔτɺΧελϜϩʔσΟ ϯάΛͭͬͯ͘3F4XJGU΢ΣΠʹ৐ͤͨ w ͱ͸͍͑ɺ6*"MFSU$POUSPMMFS࢖ͬͯΔՕॴ΋͋Δ͠ɺΩʔϘʔυͷॲ ཧͳͲɺ3F4XJGU΢ΣΠʹ৐Βͳ͍΋ͷ͕͋ͬͯ΋ɺؾ࣋ͪతʹগ͠ࣃ ͕Ώ͍͚ͩͰෆศͳ͜ͱ͸ͳ͍͸ͣ
  57. ࠩ෼ߋ৽

  58. ࠩ෼ߋ৽ ճEJTQBUDI͢Δͱ͍͏͜ͱ͸

  59. ࠩ෼ߋ৽ ճඳըߋ৽͕૸Δ6*5BCMF7JFXͷSFMPBE%BUBΈ͍ͨͳίετߴͦ͏ͳ΋ͷ͸ϚζΠͷͰ͸ʁʁ

  60. ࠩ෼ߋ৽ ճඳըߋ৽͕૸Δ6*5BCMF7JFXͷSFMPBE%BUBΈ͍ͨͳίετߴͦ͏ͳ΋ͷ͸ϚζΠͷͰ͸ʁʁ w ࠩ෼ߋ৽ͷ࣮૷͕ඞཁʁʁ w 3F4XJGUࣗ਎͸͜͜Β΁Μʹ͍ͭͯ͸ಛʹݴٴͳ͠ͷ͸ͣ

  61. 4UBUFͷ෼ׂͷ࢓ํ 4UBUFΛͲͷΑ͏ʹ෼ׂ͢΂͖ͳͷ͔ʁʁ

  62. 4UBUFͷ෼ׂͷ࢓ํ w ͱΓ͋͑ͣࠓճ͸7JFX$POUSPMMFSຖͷ4UBUFΛͭͬͯ͘Έͨ w ҟͳΔ7JFX$POUSPMMFSͰಉ͡σʔλΛࢀর͍ͨ͠έʔε͸ʁʁͱ͍͏ ͜ͱΛߟ͑Δͱଟ෼7JFX$POUSPMMFSͰ෼͚ͪΌμϝ׼ 4UBUFΛͲͷΑ͏ʹ෼ׂ͢΂͖ͳͷ͔ʁʁ

  63. ଞίʔυྔ͕૿͑Δʢ৑௕ʣɺϦηοτॲཧ 4UBUFΛͲͷΑ͏ʹ෼ׂ͢΂͖ͳͷ͔ʁʁ

  64. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂʂ