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

Rx分からんを解消する会

 Rx分からんを解消する会

社内勉強会での資料です。
RxSwiftについて開発メンバーから寄せられた質問に対して答える感じで用意した資料となります。

Suguru Kishimoto

October 22, 2018
Tweet

More Decks by Suguru Kishimoto

Other Decks in Technology

Transcript

  1. Cookpad Inc. All Rights Reserved. 0CTFSWBCMF0CTFSWFS w0CTFSWBCMF 5ZQF Ͱ͋Δ΋ͷ
 A0CTFSWBCMF&A

    A4JOHMF&A A.BZCF&A A$PNQMFUBCMFA  A̋̋4VCKFDU&A A̋̋3FMBZ&A
 ݫີʹ͸ҧ͏͚ͲɺA%SJWFS&A A4JHOBM&A΋  w0CTFSWFS 5ZQF Ͱ͋Δ΋ͷ
 A̋̋4VCKFDU&A A"OZ0CTFSWFS&A A"OPOZNPVT0CTFSWFS&A
  2. Cookpad Inc. All Rights Reserved. 0CTFSWBCMF0CTFSWFS w0CTFSWFS 5ZQF গͳ͘ͳ͍ʁͦͯ͋͠·Γఆٛ͢Δ͜ͱͳ͍Μ͚ͩ Ͳʜ


    
 ˠීஈATVCTDSJCF PO/FYUPO&SSPS Aͱ͔ͰΫϩʔδϟ౉͍ͯ͠Δ ͷͰࣗ਎Ͱ0CTFSWFSΛੜ੒͢Δ͜ͱ͸গͳ͍͕ɺཪͰ͸࡞ΒΕͯ ͍Δ
  3. Cookpad Inc. All Rights Reserved. 4VCKFDU3FMBZ w3FMBZ4VCKFDUͷϥούʔ w&SSPS $PNQMFUFE͕ྲྀΕͯ͜ͳ͍ w1VCMJTI3FMBZ͸1VCMJTI4VCKFDUɺ#FIBWJPS3FMBZ͸#FIBWJPS4VCKFDU

    ͷϥούʔʹͳ͍ͬͯΔ w&SSPS $PNQMFUFE͕ྲྀΕͳ͍ͷͰɺ
 1VCMJTI3FMBZˠ4JHOBM
 #FIBWJPS3FMBZˠ%SJWFS
 ʹ؆୯ʹม׵Ͱ͖Δ
  4. Cookpad Inc. All Rights Reserved. %SJWFS4JHOBM w&SSPS͕ྲྀΕͳ͍ wϝΠϯεϨουͰ࣮ߦ͞ΕΔ͜ͱ͕อূ͞Ε͍ͯΔ w%SJWFS͸4VCTDSJCFͨ࣌͠ʹ௚ۙͷ஋Λճྲྀ͢ ASFQMBZ

     A  w4JHOBM͸4VCTDSJCF͔ͯ͠ΒྲྀΕͯ͘Δ w6*ʹབྷΉ෦෼Ͱ࢖͏ͷʹ΋͍ͬͯ͜ w1SFTFOUFSˠ7JFXɺ7JFX.PEFMˠ7JFXͰΑ͘࢖͏
  5. Cookpad Inc. All Rights Reserved. ࢀߟ w3Y$PDPBͷ4JHOBMͱ3FMBZͷ·ͱΊ wIUUQTUFDINFSDBSJDPNFOUSZ w3Y4XJGUͷ༻ޠ·ͱΊ wIUUQTRJJUBDPNNPSJTIJOJUFNTDEFCGF

    w3Y4XJGUͷ0CTFSWBCMFͱ͸Կ͔ wIUUQTRJJUBDPNHPNJ@OJOHFOJUFNTDDGFCFFDG w3Y4XJGUΛ΍ΔલʹͪΌΜͱ0CTFSWFSύλʔϯΛֶͿ wIUUQTTUBSIPTIJIBUFOBCMPHDPNFOUSZ 394XJGU@&&&#&%&"#&"&& &"@0CTFSWFS@&&#'&#$&#&&"%" &#
  6. Cookpad Inc. All Rights Reserved. ATVCTDSJCF PO/FYUʜ A wOFYU FSSPS

    DPNQMFUFE TVCTDSJCFE EJTQPTFEɺͦΕͧΕड͚औͬ ͨͱ͖ͷॲཧΛهड़Ͱ͖Δ w4JOHMF .BZCF $PNQMFUBCMFʹͳΔͱड͚औΕΔ΋ͷ͕มΘΔ
  7. Cookpad Inc. All Rights Reserved. ACJOE PO/FYU A wOFYUΛड͚औͬͨͱ͖ͷॲཧΛهड़Ͱ͖Δ
 ATVCTDSJCF

    PO/FYU AͷΈͷ7FSͩͱࢥ͑͹ྑ͍ wFSSPS͕ྲྀΕͯ͜ͳ͍લఏʹͳ͍ͬͯΔͷͰɺ %FCVH؀ڥͰ͸ ྲྀΕ ͯ͘ΔͱΫϥογϡ͢Δ w3FMBZΛTVCTDSJCF͢Δͱ͖͸ͬͪ͜Ͱॻ͘΄͏͕ؾ࣋ͪ୹͍ͷͰ γϯϓϧʹॻ͚Δ
  8. Cookpad Inc. All Rights Reserved. AESJWF @ A AFNJU UP

    A wACJOE UP Aͷ%SJWFS4JHOBM൛ wESJWF͸0CTFSWFS5ZQFɺ#FIBWJPS3FMBZͱ wFNJU͸0CTFSWFS5ZQFɺ1VCMJTI3FMBZͱ
  9. Cookpad Inc. All Rights Reserved. ESJWF FNJU AYY PO/FYU A

    wESJWF͸%SJWFSʹରͯ͠ɺFNJU͸4JHOBMʹରͯ͠࢖͏ wOFYU DPNQMFUFE EJTQPTFEΛड͚औΕΔ
  10. Cookpad Inc. All Rights Reserved. .77.ͷྫΛऔΔͱʜ w7.ͷJOJUͰWJFXͷΠϕϯτΛ0CTFSWBCMFͱͯ͠౉͢͜ͱ͕ଟ͍
 FHϘλϯͷλοϓɺϦϩʔυͷτϦΨʔʜ  w"1*ୟ͘ͱ͜Ζ΋3YͰϥοϓͯ͠ετϦʔϜΛ࡞Δ

    w7JFXͷΠϕϯτΛجʹɺ"1*ͷετϦʔϜΛܨ͍Ͱ͋͛ͯɺ݁Ռ΍ ΤϥʔΛ%SJWFS΍4JHOBMΛ࢖ͬͯ౉ͯ͋͛͠Δ w7JFXଆͰ஋Λ͙͢ʹࢀর͍ͨ͠ͱ͖͸7.ʹ#FIBWJPS3FMBZΛ༻ҙ ͯ͠ɺASFMBZWBMVFAͰࢀর͢Δ
  11. Cookpad Inc. All Rights Reserved. KVTU FSSPS FNQUZ OFWFS DSFBUF

    PG EFGFS  GJMUFS NBQ [JQ DPNCJOF-BUFTU  XJUI-BUFTU'SPN DPODBU NFSHF GMBU.BQ  GMBU.BQ-BUFTU GMBU.BQ'JSTU UBLF TLJQ SFUSZ  BNC DBUDI TXJUDI UISPUUMF EFCPVODF  UJNFPVU CVGGFS XJOEPXʜ ˞ݴޠʹΑͬͯඍົʹΦϖϨ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