2019-11-01ãã1ã¶æéã®è¨äºä¸è¦§
ç®ç ä¿é²ã»äºé²ã»æ¹åã»ç¶æã»ç·©åã®åæã¨ãªããäºå®ã®åéã 段é æ¸¬å® è¨é² éç¥ è¡¨ç¤º: always, pull å ±å: regular, push å©ç¨ ç£è¦çµæã®å©ç¨ï¼ããã«ä¿é²ã»äºé²ã»æ¹åã»ç¶æã»ç·©åã«ã¤ãªãããï¼ ç£è¦ã¯ç¹å®ã®å´é¢ã®ã¿ã対象ã¨ãã. å®éåããææ¨ãâ¦
çµå±ã®ã¨ãããhoursã¹ã±ã¼ã«ã ã¨single taskåãã®äººé. ããã«åä½æéã®å¯åº¦ãä¸ãã¦ããã å²ãè¾¼ã¿ã¿ã¹ã¯ãæ¸ããã æ°ããããè¦å ãæ¸ããã åç»æµãã®ã¯çµå±è¯ããªã. é³æ¥½ãåããªã. ã¢ããã¼ã·ã§ã³ä¸ããããã«ä¸æçã«é³æ¥½èãã®ã¯ã¨ã¦ãæå¹ã â¦
FRP library functionalç³» (map, filter) streamç³» (merge, combine) boss (flatMap, combineTemplate) Element (event source)
"å½ããåã®ããã«" "æ¯ãããããã«" "èªç¶ã¨" åç©ã¯å¸¸æçæ ®ãããããã«ã¯ã§ãã¦ããªã. æçã§åãã¦ãã. "å½ããå"ã®ææ³ã¯åããªã. ç¿æ £ æ ç± èªåå ãªãã§ãããã c.f. å¡äºå¾¹åº ææ¦ã楽ãã c.f. ãããã
ç®çã¨è¯ãè¨è¨ã¨æ½è±¡å/æ±åã¨è¤éæ§ ãªã¼ãã¼ã¨ã³ã¸ãã¢ãªã³ã° 欲ãããªããã®: éå¹çãªè³æºã®å©ç¨ ããå®è£ ãããé ã·ã³ãã«ã«1æéã§å®è£ å®è£ ã®ã¡ã³ãã³ã¹ãã¯ä¸ å®è£ ã®æ¡å¼µã³ã¹ãã¯å¤§ æ½è±¡åãã¤ã¤1æéã§å®è£ å®è£ ã®ã¡ã³ãã³ã¹ãã¯ä¸ å®è£ ã®æ¡å¼µã³â¦
ç¾å®ãèªèããå¤æããè¡åãã. ç¾å®ãèªèããªããã°è¡å㯠"ããå¼ã" ã«ãªããç¾å®ããç®ãèããã°è¡å㯠"ç¾å®ã¨çéã®èæ§ãæ±ã" ããã«ãªã. ãç¾å®ã«åºã¥ããã¨ããå½ããåãé«ãã¬ãã«ã§å®è¡ãããã¨ã人çã®ã³ã. èããã®ã¯èããã¦ãã æ¦è¦â¦
holistic å ¨äººç é¨åæé©/å ¨ä½æé© 2+2 = 1+3 # çè«ãæèãå®è£ ãã¢ããã¼ã·ã§ã³ããªã½ã¼ã¹, å ¨é¨ã§åè² . æé mealiy, daily, weekly, monthly, yearly
åéãã«ããå«ãã 説æãèãã¦ãããå¿ è¦ å«ãã«ãªã£ããèãããªããªãã¿ã¤ã èããæ°ããªã/ãããªãã¿ã¤ã ã¯ã©äººå½¢ã¿ã¤ã å«ããã¯å¥ä»¶æ¹å¤ã®éå ·ã§ççã«èå³ããªã åéãã解æ¶ãã¦ã好ãã«ã¯ãªã£ã¦ãããªã
ååç: è¨å®ãããåé¡ãã½ããã¦ã§ã¢ã§è§£æ±ºãã ãåé¡ã解ãã ç¾ä»£ç: åãçµãã¹ã課é¡ã«å¯¾ããã½ããã¦ã§ã¢éçºãä»ãã¦èª²é¡ã®æ確åãåé¡è§£æ±ºãå³ããªããããè¯ãåçãæ±ãã¦ãã ãç¶æ³ãæ¹åãã¦ããã ããã°ã©ãã³ã°ã¯ææ§ããæ±ããã¨ãä¸å¾â¦
entangled -> separated -> generalized ãã¡ããã¡ãã®ã³ã¼ãã¯ãã®ã¾ã¾æ±åã§ããªã. ã³ã¼ããæ´çãã¦æ©è½å¥ã«ã¾ã¨ã¾ããä½ã£ã¦ãå ±éé¨åãæ±åç¨ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ãã¦åãåºã. æ½è±¡å -> æä¸å±¤: è¤éæ§âãä¸å±¤: è¤éæ§â æ±åç¨ã¤ã³ã¿ã¼ãã§ã¼ã¹èªä½â¦
è«ç è¦éãã®è¯ãï¼æ æ°ããã°ã©ãã³ã°ï¼ ç¶æ åé¢ + 宣è¨åããã°ã©ãã³ã° ãã¼ã¿ããã¼å®ç¾© + ã©ã³ã¿ã¤ã TSã§ã®å®è£ ãã¼ã¿ããã¼å®ç¾© åç´ãªé¢æ°é£é ã©ã³ã¿ã¤ã åè£ ãã ã®é¢æ°é£é ç¬èªã®Observerãã¿ã¼ã³ Redux FRP RxJS Bacon.js å®ædata fetchãâ¦
æ æ°ããã æ æ°ããããã«ã楽ã«ããã°ã©ã ãæ¸ãããã ãã®ããã«ä½ãå¿ è¦ãã èæ¯ -æ¸ãæ¹ã®å·¥å¤«ã¯ã§ãããã¨ãå¢ããã¯ããªã- ããè¨èªã使ãéããã¹ãã¹ãã®å½ä»¤åãã©ãã¤ã ã§æ¸ããã³ã¼ãã¨OOPãFPã§æ¸ããã³ã¼ãã§ãå®è¡å¯è½ãªå 容ã¯çããã ãâ¦
Godã¢ãã«: 対象ã®å ¨ã¦ã®æ å ±ãæ£ç¢ºã«å«ãã ã¢ãã« ãã®ã¢ãã«ããä¸æãæ±ããã°å ¨ã¦ã®ç¨éã«ããã¦å ¨å¡ãåä¸ã¢ãã«ãå©ç¨ã§ããããç¥ã â æ®å¿µãªãããè¯ãè¨è¨ãããæ°åã®å±æ§ããã¤ã¢ãã«ã¯äººã®æã«ä½ãâ¦æ±ããªã⦠ãGodã¢ãã«ã®ââå±æ§ã®å¦çã«ã¤ãã¦â¦
ç¶æ ã¯ç¾å®ã§ããæ¦å¨ã§ãããã°ã®æ¸©åº. å ±ã«ãã£ã¦ããã«ã¯ç¥èãå¿ è¦. è¨è ç¶æ / state ç¶æ ãæ㤠/ stateful 1 ç¶æ ãæããªã / stateless ç¶æ ã¨ã¯ä½ã ãªã«ã§ããã å¤åãããå¤ åç §"ããã"å¤ ç¬ç«ããå¤ ä½ãããå°ãåºããããã®ã§ã¯ãªã 1ã¤â¦
ãåæ£ããã³ã³ãã¼ãã³ããå調ãã¦ã¢ããªã±ã¼ã·ã§ã³ãæ§æããã å調 = è¤æ°ã®ç¬ç«èµ·åããã³ã³ãã¼ãã³ããç¸äºä½ç¨ãã¦ã¢ããªã±ã¼ã·ã§ã³ã®æ©è½ãéæãã. åæ£ãããã¨ãã«"å ±æ"ãããã¹ããã®ãå®ç¾©ããï¼interfaceï¼ c.f. local state domainãå¤é¨â¦
ãã¿ã¹ã¯ãªã¹ãããToDOãã¯ä½ã欲ããã¦æ¸ãã¦ããã®ãªã®ã. # ç¥ãããããããã¹ããã¨ããä¿¡è¨ToDOã渡ããã¦ããããï¼ => ä»äºº/親ãããããããããªãããã¨ãããã¦ããã£ããï¼ ãã¹ããã¨ã®å ·ä½çãªã¹ãã渡ããã¦ããããããã£ããã¨ããã¨ã¯éâ¦
Redux is a predictable state container for JavaScript apps æ¦è¦ Reduxã欲ãããã®: äºæ¸¬å¯è½æ§/predictability (statet=0, action1, 2, ..., n, reducers) ãä¸ããããã°ãt=0ããt=nã¾ã§ã®å ¨ã¦ã®stateãäºæ¸¬ã»åç¾ã§ãã. âµ RootRuducer(statet, actiâ¦