t o n = ( B u t t o n ) f i n d V i e w B y I d ( R . i d . b u t t o n 1 ) ; v a r b u t t o n = d o c u m e n t . g e t E l e m e n t B y I d ( ' b u t t o n ' ) ; Tight coupling but other half of the code is in another file Doesn't scale/increases headaches
n e x t e n d s R e a c t . C o m p o n e n t { / / E S 6 s y n t a x ? I t h i n k s o c o n s t r u c t o r ( p r o p s ) { s u p e r ( p r o p s ) ; t h i s . s t a t e = { c o u n t e r : 0 ; } } r e n d e r ( ) { r e t u r n ( < d i v o n c l i c k = " { t h i s . h a n d l e C l i c k . b i n d ( t h i s ) } " > { t h i s . s t a t e . c o u n t e r } < / d i v > ) } h a n d l e C l i c k ( ) { t h i s . s e t S t a t e ( { c o u n t e r : t h i s . s t a t e . c o u n t e r + 1 } ) ; } } Componentcontained State Declarative UI Scales/fewer headaches
different engineers because there are three different sets of tool chains, languages, and API’s Christopher Chedeau on the Core Philosophies that Underlie React, 2016