ãŸãã¯ã¯ã©ãŒã±ã³ãã³ã ã åã®ã¡ã¢ïŒ ãããšãã ïŒã§ãããŸããŸãªã¢ãŒããã¯ãã£ã¹ã¿ã€ã«ãç¹ã«Model-View-ControllerãšFluxã«ã€ããŠBraindumpãå ±æããŸããã
ç§ã¯ãFluxã«çŽé¢ããŠäœã®é©åœãèŠãªãã£ãããšã«æ³šæããŸããããã®ãã³ãã¬ãŒãã¯æ°ãããã®ã§ã¯ãããŸããã 1979 Reenskaug-MVCã«äŒŒãŠããããšãããããŸãã ã ãŸããã³ãŒãããReduxïŒFluxå®è£ ã®1ã€ïŒãåé€ããããšã決ãããšè¿°ã¹ãŸããã ãããã®ç¹ããã詳现ã«èª¬æããå¿ èŠãããããã«æããŸãã ç§ã®ç®æšã¯ãèªè ã«FluxãMVCãšåŒã¶ã¹ãã§ãããšçŽåŸãããããšã§ããreduxã¢ãžã¥ãŒã«ãäžè¯ã§ãããå®å šã«æŸæ£ãããã¹ãã ãšèšãããšã§ããããŸããã
ã§ã¯ãFluxã¯ã©ãã§ããïŒ
ãŸããFluxãšã¯äœããå€æããå¿ èŠããããŸãã ãŸããããã¯ééããªãã¢ãŒããã¯ãã£ã¹ã¿ã€ã«ã§ãããçŸæç¹ã§ã¯ãWebã¯ã©ã€ã¢ã³ãã¢ããªã±ãŒã·ã§ã³ã ãã®ãã®ã§ã¯ãããŸããã 次ã«ãæ確ã«å®çŸ©ãããã³ã³ããŒãã³ããšçšèªã®ã»ããã§ãã
ãã®æŠå¿µã®å®è£ ã¯ãã§ã«å€æ°ãããŸãããæã人æ°ã®ãããã®ã¯Facebook / Flux ã Redux ã Fluxxor ã Reflux ã Vuejs / Vuex ã Mobxã®ã¿ã§ãã SAM.js ïŒState-Action-ModelïŒã®åœ¢åŒã§ãšããŸããã¯ãªãã®ããããŸãã
ããããéèŠãªããšã¯ã Dispatcher ã Action ã Storeãããã³StateãšããçšèªããçŸä»£ã®ã¯ã©ã€ã¢ã³ãã¢ããªã±ãŒã·ã§ã³ã¢ãŒããã¯ãã£ã§å³ããäœçœ®ãå ããŠããããšã§ãã æ°ããã·ã¹ãã ã«æ¥ãéçºè ãã³ã³ãããŒã©ãŒã¬ã€ã€ãŒãæ¢ãã®ãšåãããã«ãä»ã§ã¯ã¹ãã¬ãŒãžãŸãã¯ãã£ã¹ãããã£ãŒãæ¢ããŠããŸãã
ããã§ããã«ã©ãé¢ä¿ããã®ã§ããããïŒ æ²»çã¯ééããªãè¯ãã§ãã ç§ã«ãšã£ãŠãFluxã¯ç¬¬2ã¬ãã«ã®SoCïŒæžå¿µã®åé¢ïŒã§ãããç¹å®ã®MVCã³ã³ããŒãã³ãå ã®è²¬ä»»ã®åºåã§ãã ããã¯æ°ããã¢ã€ãã¢ã§ã¯ãªãã Taligent-MVPãã³ã³ãããŒã©ãŒã¬ã€ã€ãŒãåèãããããã€ãã®ä»ã®ã¬ã€ã€ãŒã«åå²ããããšãã«å®è¡ããããšããããšã§ãã
ããã¯ä»£æ¿ã§ã¯ãªãã次ã®ã©ãŠã³ãã§ãããããã¯ã¢ãŒããã¯ãã£ãã¿ãŒã³ã®é²åã§ãã
ãæ°ãããã®ã¯ãã¹ãŠå¿ãå»ãããŠããããšããã¡ã¢ãã
I.ããã³ã®ãã¬ãŒã³ããŒã·ã§ã³ããªããã¡ã€ã³ãæåãªã®ãããã
ããæ°
責任ã®åé¢ã¯ããããžã§ã¯ãã®ã³ãŒããã觊æãã©ã³ãã ã«çµ¡ã¿åã£ãŠã³ãŒãæ§é ã®è¿·è·¯ãæ§ç¯ããæããããã¹ã¿ã¢ã³ã¹ã¿ãŒã«å€ããªãããã«ããã¢ãããŒãã§ãïŒ ã¯ã©ãŒã±ã³ãåã®ã¡ã¢ãåç § ïŒã
ãã ããåè¿°ããããã«ããã¹ãŠã®ã³ã³ã»ãããŸãã¯ãã³ãã¬ãŒãã¯ãããããçºæãããåé¡ããå§ãŸããŸãã Facebookã¯å€§äŒæ¥ã§ããã巚倧ãªå²åã®Webã¢ããªã±ãŒã·ã§ã³ã§ãããæé«ã¬ãã«ã®åæ¹åæ§ã®éã§ãã ãããFluxãçºæãããã®ã§ãã ããããããããŸãã«ãã®ã³ã³ã»ãããã³ãã¥ããã£ã«åãå ¥ããããªãçç±ã§ãã åæ§ã®ãœãããŠã§ã¢ãéçºããŠããäŒæ¥ã¯ããã€ãããŸããïŒ
è€æ°ã®ãªããžããªãå®éã«å¿ èŠãšããã¢ããªã±ãŒã·ã§ã³ãããã€éçºããããèããŠãã ããã ã¢ããªã±ãŒã·ã§ã³ãããã€éçºããå Žåããã®ãã³ãã¬ãŒãã¯æ¬åœã«åœ¹ç«ã¡ãŸããïŒ
åããã¯ã«ã¯ç¬èªã®ããŒãå¿ èŠã§ãã ããŒãããã€ãã®ããã¯ã«æ¥ãããšãããã°ãåã§æŒããŠãã¢ãéããããšããããŸãã ç§ã®é ã®äžã«ãã¬ãŒãºãçŸããŸãïŒ
çæ§ã®å£°ã«è³ãåŸããããµã€ã¬ã³ã®å£°ã§äžèœè¬ãæã売ãæã«æ³šæãæããããªã
V. M.ã¿ãŒã¹ããŒïŒF.ãã«ãã¯ã¹ã®ãç¥è©±ç人éæãã®æ¬ããïŒ
宣äŒãããŠããæšæºããé ã倱ããäž»ãªã¿ã¹ã¯ãå¿ããŠããéçºè ã®ã°ã«ãŒããèŠãŸããïŒã¯ã©ã€ã¢ã³ãã®å©çãå®çŸãã
R.ããŒãã£ã³
Reduxã¯ã³ãã¥ããã£ã«æãããŸããã ãã®å®è£ ã¯ãå¹³åçãªã¢ããªã±ãŒã·ã§ã³ã«å¿ èŠãªãã®ã§ãã ç§ããã®ãã¯ãããžãŒã¹ã¿ãã¯ã«ç§»è¡ãããšããæåã®ã¢ããªã±ãŒã·ã§ã³ã¯æšæºçã«æžããããã®ã§ããã React-Redux-ThunkïŒããã«ãŠã§ã¢ïŒã®æã䜿çšããŸããã ã¢ã¯ã·ã§ã³ã®ã¿ã€ãã«ã¯ã¢ã¯ã·ã§ã³ ã¯ãªãšãŒã¿ãŒãšæååå®æ°ã®äž¡æ¹ãããããããããã€ã³ãã¢ã¯ã·ã§ã³ã¯ãªãšãŒã¿ãŒããããŸãã ã ãã¹ãŠã¯å ¬åŒãµã€ãã¬ã€ãã«ãããŸãã
ããããããæç¹ã§ããã®éæ³ã®ã¢ãžã¥ãŒã«ã®ãã¢ãå éšã§ã©ã®ããã«æ©èœããããšããçåãçããŸããã Documentum Foundation Classesã³ãŒãããŒã¹ãæ±ã£ãŠããç§ã®ãããªéçºè ã«ãšã£ãŠãredtop-moduleã®ããã€ãã®æ©èœãæ±ãããã«Webtopã«çµ±åãããExtJS 3.1ã®ãœãŒã¹ãèªãããšã¯é£ãããããŸããã ä»ã®ã»ãšãã©ã®çµéšè±å¯ãªããã°ã©ããŒãšåæ§ã ããããããŸããŸãªã¬ãã«ã®éçºè ãããââãžã§ã¯ãã«åãçµãããšã¯èª°ã«ãšã£ãŠãç§å¯ã§ã¯ãããŸããã æ幎å°ã§ããããã®ãŸãã«ã ããŒã ãã®äžã§äœãèµ·ãã£ãŠããã®ããææ¡ã§ããããã«ããã«ã¯ã©ãããã°ããã§ããããïŒ çµå±ã®ãšãããããã°ã©ããŒã¯èªåã®ããŒã«ãç¥ã£ãŠããå¿ èŠããããŸãã
ç§ã®åšãã®éçºè å šå¡ããã®éæ³ãã©ã®ããã«æ©èœããã®ãããŠãµã®ãåžœåããã©ã®ããã«çŸããã®ããç解ããŠããªãããŸãã¯å°ãªããšãåã«çåã«æã£ãŠãããšããäºå®ã«çŽé¢ããŸããã ããã¯ãããããFlux / Reduxå®è£ ãäœæããããã®è§ŠåªãšããŠæ©èœããæåã®ãã€ã³ãã§ããã æåŸã«ãäœããç解ããäœããåèããæè¯ã®æ¹æ³ã¯ãèªåã§ãããæžãããšã§ãã ã³ãŒãã¯ããŒã å šäœã§å©çšã§ãã誰ã§ãäœããè¿œå ãŸãã¯åé€ãããããããã¬ãŒã䜿çšããŠãè¡ã®ç®çãç解ãããã§ããŸãã
æ®ãã®åæ©ä»ãã®ãã€ã³ããèŠãŠãããŸãããã åæ¹åããŒã¿ãããŒã®æŠå¿µã¯æ確ã§ãªããã°ãªããŸããã åæ¹åã®ããŒã¿ãããŒã¯ã觊æã§ã¢ã³ã¹ã¿ãŒã殺ãããšãå¯èœã«ããŸãã ãããŠãããããããã®ã¢ãããŒãã§æããããŸããªç¬éã¯JavaScriptã®éåææ§ã§ããããããåæ¹åããŒã¿ã¹ããªãŒã ã®æŠå¿µã«ã©ã®ããã«åœãŠã¯ãŸããã§ãã
ãã®ç¹ã決å®ããããã«äººã ãéžæããããã€ãã®ãªãã·ã§ã³ããããŸãã 1ã€ã®äŸã¯ãµã³ã¯ã§ãã å人çã«ã¯ã ããã«ãŠã§ã¢ïŒäžéã³ã³ãã¥ãŒãã£ã³ã°ïŒã¯ãFluxã¢ãŒããã¯ãã£ã¹ã¿ã€ã«å ã®äžçš®ã®å¯äœçšã®ããã«èŠããŸãã çŽç²ãªåœ¢ã§ã®ãã³ãã¬ãŒãã®äœ¿çšã劚ããç©Žãå¡ãè©Šã¿ã OOPã®UtilsãHelperããŸãã¯Serviceã¯ã©ã¹ã®ãããªãã®ã§ãã éçºè ãç¹å®ã®ããžãã¹ã¯ã©ã¹ã«ããžãã¯ãæã¡èŸŒããªãå Žåã圌ã¯ãã®éæ³ã®ãããªå Žæãå©çšããŠããã®ãããªãã¹ãŠã®æ ä¿ïŒæçšïŒïŒæ©èœãé 眮ãå§ããŸãã å®éããã®å¯äœçšã¯ãªããžããªã®æ©èœã«ãããŸããã ã¹ãã¬ãŒãžã¯æ°žç¶çã§ããããããåé³ç¯CRUDæäœã®ããªãºã ãéããŠããŒã¿ã«ã€ããŠèããããšã劚ãããã®ã§ãã
ééããªãã³ãŒãã¯ãããã§ãªããã°ãªããŸããã ããã¯ãããã®ããã°ã©ããŒããããžã§ã¯ãã§åªåããŠããããšã§ãã å¹ åºãã¿ã¹ã¯çšã«äœæãããŠãããããã»ãšãã©ã®ããŒã«ã¯åé·ã§ãã ãããã¯ãããžã§ã¯ãçšã«äœæããããã®ã§ã¯ãªããã¿ã¹ã¯ã®ã¿ã€ãçšã«äœæããããã®ã§ããããŸããã ãããã誰ãããã¬ã³ããè¿œãããã誰ããäžèœè¬ãè¿œããããŠããŸãã
ãµã³ã¯ãšbindActionCreatorsã¯ç§ã«ãšã£ãŠå¯äœçšã§ãã æ¥ç¶é¢æ°ã®2çªç®ã®åŒæ°ãã€ãŸãmapDispatchToPropsãå¿ èŠãšããªãã¢ãããŒããéžæããŸãã ãšããã§ããããžã§ã¯ãã§connecté¢æ°ã®3çªç®ã®åŒæ°ã䜿çšããããšããã人ã¯ããŸããïŒ è¬ã®æã¯çŽç²ããïŒ
觊åªãšããŠæ©èœãã2çªç®ã®ãã€ã³ãã¯ã䜿çšããããŒã«ã®åé·æ§ã§ã ã
ãšããã§ãNicklaus Wirthã®ãæ°ã«å ¥ãã®ãã¬ãŒãºã®1ã€ïŒ
ããŒã«ã¯ã¿ã¹ã¯ã«é©ããŠããå¿ èŠããããŸãã ããŒã«ãã¿ã¹ã¯ã«å¯Ÿå¿ããŠããªãå Žåãããã«å¯Ÿå¿ããæ°ããããŒã«ãèãåºãå¿ èŠããããæ¢åã®ããŒã«ãé©å¿ãããããšããªãã§ãã ããã
3çªç®ã®ãã€ã³ãã¯ã ãã§ãããããã§ãã ã¯ããããã§ããç§ãã¡ã¯ããã°ã©ãã§ããããç¬èªã®ããŒã«ãæžãããšãã§ããŸãã ããšãã°ãReactãSpringãã¬ãŒã ã¯ãŒã¯ãæžãçŽãããããã§ã¯ãããŸããã ããããSpringå šäœãããããå¿ èŠãšããªããããžã§ã¯ãã«ãã©ãã°ããŠãæå³ããããŸããã ããšãã°ãåææ¥ã®å€ã«å°èŠæš¡ãªFluxå®è£ ã«è²»ããã®ã¯æ±ºããŠæ ãè ã§ã¯ãããŸãããããã«ãããã¢ããªã±ãŒã·ã§ã³ã®ããŒãºãæºããããŸãã ããã¯ç§ã«ãšã£ãŠãåã³ã§ãã
èªè»¢è»ãã圌ã«Artuxãšããååãä»ããŠãã ãã
Reduxã¯æ©èœçãªã¹ã¿ã€ã«ã§æžãããŠããŸããããã°ã©ãã³ã°ã®ãã©ãã€ã ã®èŠ³ç¹ããèšãã°ãJavaScriptã¯ãã«ããã©ãã€ã ã®ã«ãŒãã³ãéãçŽ æŽãããèšèªã§ãã ç§ã¯æãé¢ãšæããé¢ã®ãã©ã³ã¹ããšã£ãŠããŸãã
ããããã¯ã©ã¹ã¯ã€ã³ã¿ãŒãã§ãŒã¹ãèšè¿°ããæ¹ãç°¡åã§ãã ãã¹ãã¬ãŒãžããšèšããšã1ã€ã®ååã§çµåãããäžé£ã®é¢æ°ããããç¹å®ã®APIã¡ãœãããæã€ãªããžã§ã¯ããšããŠèªèããæ¹ãç°¡åã§ãã
以äžã¯ãã¹ãã¬ãŒãžå®è£ ã®ã€ã³ã¿ãŒãã§ã€ã¹ã§ãã unsubscribeé¢æ°ããããªãã¯ã¡ãœããã«ç»å Žããããšãé€ããŠãReduxããŒãžã§ã³ãšéåžžã«äŒŒãŠããŸãã reduxã¢ãžã¥ãŒã«ã§ã¯ã subscribeé¢æ°ã§éããããŸãã
Storage Designerã¯ã察å¿ããReducer / ReceiverãåããModelsããããåãå ¥ããŸãã
ã¢ãã«ã¯ããã¡ã€ã³ã®äžéšã§ããç¹å®ã®ããžãã¹ãšã³ãã£ãã£ã«å¯Ÿå¿ããããŠã§ã¢ããŠã¹ã®è«ççãªååä»ãéšéã§ãã ç§ã®èŠè§£ã§ã¯ãVaultã«ã¯ããžãã¹æ å ±ã®ã¿ãå«ãŸãããã§ãã¯ããã¯ã¹ãã©ãžãªãã¿ã³ãªã©ã®ã°ã©ãã£ãã¯ãŠã£ãžã§ããã®ç¶æ ã¯å«ãŸããŸããã
ãã³ãã©ãŒã¯ãå€éšããåä¿¡ããã³ãã³ãã«å¿çããé¢æ°ãŸãã¯ã¯ã©ã¹ã§ãããããŒã ãéã¶æçšãªæ å ±ã«åºã¥ããŠãã¢ãã«ã®ç¶æ ãå€æŽããŸãã
以äžã¯ã StoreProviderã¯ã©ã¹ïŒã¹ãã¬ãŒãžãããã€ããŒïŒã®ã€ã³ã¿ãŒãã§ã€ã¹ã§ããããã¯ã å ã®ã¯ã©ã¹ãšã»ãŒåãã§ãããã¹ãã¬ãŒãžã€ã³ã¹ã¿ã³ã¹ãã¢ããªã±ãŒã·ã§ã³ã³ã³ããã¹ãã«åã«é 眮ããŸãã
以äžã¯ã subscribeToStoreé¢æ°ãçæããé«æ¬¡ã³ã³ããŒãã³ã/ HoCã€ã³ã¿ãŒãã§ãŒã¹ã®èª¬æã§ãããconnecté¢æ°ã眮ãæããŸãã
åè¿°ããããã«ãåé·æ§ãåé€ããã¹ãã¬ãŒãžç¶æ ãªã¹ããŒã®ã¿ãå ¥åã«è»¢éãããããã«ãªããŸããã ãã®ã³ã³ããŒãã³ããšæ··åšããäž»ãªããžãã¯ã¯ããªãã¹ã³ãããŠããããŒã¿ãšæ¬¡ã®ç¶æ ããååŸããå€ã確èªããããšã§ãã æ°ããå€ãååŸããå Žåãã³ã³ããŒãã³ãã©ã€ããµã€ã¯ã«ã¡ãœãããèµ·åããããã®çµæããã¥ãŒå šäœã®ãã¹ãŠãŸãã¯äžéšãæŽæ°ãããŸãã
ãããŠãç§ã®è¬èãªå®è£ ã®æåŸã®ã³ã³ããŒãã³ãã ãã£ã¹ãããã£ã€ã³ã¿ãŒãã§ã€ã¹
ã³ã³ããŒãã³ãã®äž»ãªç®çã¯ããªããžããªã«ã¡ãã»ãŒãžãéä¿¡ããããšã§ãã ãã®ã€ã³ã¿ãŒãã§ã€ã¹ã¯ãã¢ã¯ã·ã§ã³ãªããžã§ã¯ããäœæã§ããã¡ãœãããšãæ°žç¶çãªæäœã®éåææ§ãã åãã ãã¢ã¯ã·ã§ã³ããã£ã¹ãããããã¡ãœãããæäŸããŸãã çŽæã¯æšãŠããããã·ã¹ãã å ã®åå¿ã¯ç¹å®ã®ã¢ãã«ã®ç¶æ ã®å€åã«åºã¥ããŠã®ã¿çºçãããšããèªè ã®æ³šæãåŒããŸãã
ã¢ã¯ã·ã§ã³ã¯ã次ã®ãã£ãŒã«ããå«ãJSONãªããžã§ã¯ãã§ãã
- ã¿ã€ãïŒã¿ã€ãïŒ -æååãªãã©ã«ããŠãŒã¶ãŒã¢ã¯ã·ã§ã³ã®ååã
- æçšãªæ å ±ïŒãã€ããŒãïŒ -ã¹ã«ã©ãŒå€ãŸãã¯ããŒã¿æ§é ã«ããããšãã§ããŸãã
- ã¡ã¿ãŸãã¯ãµã€ãæ å ±ïŒã¡ã¿ïŒ -ãã®ããããã£ãä»ããŠãã¢ã¯ã·ã§ã³ã«å¹æµããæäœãå®è¡ããããã«å¿ èŠãªè¿œå ã®ããŒã¿ïŒå ¥ååŒæ°ãªã©ïŒã転éã§ããŸãã
- ãšã©ãŒã€ã³ãžã±ãŒã¿ïŒãšã©ãŒïŒ -ã¢ã¯ã·ã§ã³ã«å¹æµããæäœã®æåãŸãã¯å€±æãåæ ããããŒã«å€ã
ãŸãã ãããã·ãšReflect es6ãªããžã§ã¯ãã䜿çšããŠããã䟿å©ãªãããã°ã®ããã«ç¶æ å€æŽã³ã³ãœãŒã«ã«ãã®ã³ã°ã¡ã«ããºã ãè¿œå ãããŸããã
ã¢ããªã±ãŒã·ã§ã³ããã€ã¹
ãã¥ãŒã®æäžäœã«ããã®ã¯Pagesã§ãã ãããã¯ãã°ã©ãã£ã«ã«ãŠã£ãžã§ããã®ããªãŒå šäœã®èŠªã§ããã³ã³ããã³ã³ããŒãã³ãã§ãã
ããŒãžã¯ãã¹ãã¬ãŒãžç¶æ ã®å€æŽããµãã¹ã¯ã©ã€ãããããŒã¿ã¹ããªãŒã ãããªãŒã«è»¢éããHoCã³ã³ããŒãã³ãã§ãã ãŸãããã®ãããªåãªããžã§ã¯ãã«ã¯ç¬èªã®ã€ã³ã¿ã©ã¯ã¿ãŒã¬ã€ã€ãŒããããŸãã ãã®ã¬ã€ã€ãŒã¯ãããŒãžãŸãã¯ã¢ã³ã«ãŒéã®é·ç§»ãšã¢ã¯ã·ã§ã³ïŒã³ãã³ãïŒã®å®è¡ã®åæåã®2çš®é¡ã®æäœãçµã¿åãããŸãã
çžäºäœçšã¯ã©ã¹ã¯ãå®éã«ã¯ã1ã€ã®å Žæã§Dispatcherããã³Routerãšã®éä¿¡ãçµã¿åãããããšãã§ããããªããžã§ãã 以äžã¯ããã®ã¯ã©ã¹ã®ã€ã³ã¿ãŒãã§ãŒã¹ã®äŸã§ãã
ã·ã¹ãã å ã®åã¢ãã«ã¯ããã®ãã³ãã©ãŒïŒãªãã¥ãŒãµãŒ/ã¬ã·ãŒããŒïŒã«å¯Ÿå¿ããåä¿¡ããã¢ã¯ã·ã§ã³ã«åºã¥ããŠãã¢ãã«ã®ç¶æ ãå€æŽããããå€æŽããªãã®ã¯åœŒã§ãã
ã©ã€ã³ãéããŠå€ãã®çšèªãæžããŠãããŒãã³ã°ã®2ã€ã®ããªãšãŒã·ã§ã³ã瀺ããŸãã ããã«ãããããã€ãã¢ãã¶ã€ã³ãã¿ãŒã³ã«ãããå€ãã®äººã«ãšã£ãŠæ¢ã«éŠŽæã¿ã®ããåæ§ã®æŠå¿µãå®è£ ã§ããããšã«æ³šæããŠãã ããã
ãã³ãã©ãŒã®ç§ã®ããŒãžã§ã³ã¯Reducersã§ãã ç§ã¯ãã¢ã¯ã·ã§ã³ã®çš®é¡ïŒPENDINGãSUCCESSãFAILïŒã®åå²ã®ããã«èšè¿°ããªããã°ãªããªã倧éã®å®æ°ã«åžžã«æ©ãŸãããŠããŸããã æåã«ããã³ãã©ãŒå ã§ãªãã©ã«ã«çŽæ¥åãçµãããšã«ããŸããã 第äºã«ããªããžã§ã¯ãã¢ã¯ã·ã§ã³ã¯ãå¿ èŠãªãã¹ãŠã®æ å ±ãäŒããããšãã§ããéåžžã«æè»ãªããŒã«ã ãšæããŸãã 第äžã«ãå人çã«ã¯ãGET_ITEMS FAILãšåŒã°ãããŠãŒã¶ãŒã®ã¢ã¯ã·ã§ã³ãç¥èŠããã®ã¯é£ããã§ãã åæããŸããããã¯ããšã³ããŠãŒã¶ãŒãå®è¡ãããã¢ã¯ã·ã§ã³ã§ã¯ãªããGET_ITEMSãå®è¡ããŸããããªããžããªå ã®ã¢ãã«ã«å°éããã®ã¯ãã®ã¢ã¯ã·ã§ã³ã§ãã
ããã§ãã¢ããªã±ãŒã·ã§ã³ã®äžè¬çãªæŠèŠã衚瀺ã§ããŸãã 圌女ã¯ãããªæãã ã£ã
#DMP_END
ä»ã®åè·¯ãšåæ§ã«ããã®ã¢ãŒããã¯ãã£ã觊æã®ããã¿ã³ã«ãªããŸãã ãã®ããŒãžã§ã³ã§æãåãå Žæã¯ããã©ãŒãã³ã¹ã§ãã ãã ããããã§ã¯ãReactèªäœãããã¬ãŒã³ããŒã·ã§ã³å±€ã®å®è£ ã«ç¹åããã©ã€ãã©ãªã§ããç§ãã¡ãæ¯æŽããããã«åŒã³åºãããŸãã ãŸãã ã³ã³ããŒãã³ãã®ç¶æ¿ïŒHoCããã³OOPã®ç¶æ¿ïŒãªã©ãå€ãã®ææ³ããããŸãã ã¿ã¹ã¯ã¯ã»ãŒåçŽã§ã-æ°ããã¢ã³ã¹ã¿ãŒ-FSUVïŒFat Stupid Ugly ViewïŒã®èªçãé²ãããã«ã
説æã®äžã§ãreduxã¢ãžã¥ãŒã«ããŒãžã§ã³3.6.0ã«èšåããŠããããšãæ確ã«ããå¿ èŠããããŸãã æ£çŽãªãšãããç§ã¯ããã©ãŒãã³ã¹ã§ããŸãåã¡ãŸããã§ãããããŒãžã®ã¬ã³ããªã³ã°ã¯åæã«è¡ãããŸãã ããããçªç¶ãã®ã¢ãžã¥ãŒã«ãnpmããå®å šã«æ¶ããå Žåããã§ã«ç解ããŠããããã«ãç§ã¯ãã»ã©æ²ããããšã§ã¯ãããŸããã
èŠçŽãããšãåã¿ã¹ã¯çšã®ããŒã«ããããããŒã«ã®ç¬èªã®å°ããªå®è£ ãäœæããŸããããåŸç¶ã®ã¢ããªã±ãŒã·ã§ã³ã«ã¯é©ããªãå ŽåããããŸãã å€åããã¯ãã£ãšæ®éçãªãã®ã«é²åããããå€åç§ã¯åã³æšæºã®åå¿ã¹ã¿ãã¯ã«æ»ãã§ãããã
ã¡ãªã¿ã«ãã¡ãœããã®å®è£ ãå ·äœçã«ç€ºããã®ã§ã¯ãªããã€ã³ã¿ãŒãã§ã€ã¹ã®ã¿ã瀺ããŸãããããã¯ãèªè ã䜿çšããã©ã€ãã©ãªã®ãœãŒã¹ã³ãŒããèŠã«è¡ããèªåã®ãããžã§ã¯ãã«åã£ãç¬èªã®å°ããªå®è£ ãäœæããããšããåæ©ã§ãã
ãã®ã¡ã¢ã§ã¯ãFluxã¢ãŒããã¯ãã£ã«ã€ããŠã®èãããæ··ä¹±ããããŒãã§ãããæ··dumpãšãããã³ããã«ããããŸãã artur.basak.devingrodno@gmail.comã®ãã£ãŒãããã¯ããåŸ ã¡ããŠããŸãã
åç §è³æ
+ãã©ãã¯ã¹æšæºã¢ã¯ã·ã§ã³
+ Redux
+ãã©ãã¯ã¹
+ I.ããã³ããªããã¡ã€ã³ãæåãªã®ãïŒã