Forces us to decouple our code and think with components Can ultimately solve the frontend/backend code duplication Great community and ecosystem First step to embrace modern frontend practices
COMPONENTS c l a s s D a t a g r i d e x t e n d s R e a c t . C o m p o n e n t { c o m p o n e n t D i d M o u n t ( ) { / / I n i t j Q u e r y p l u g i n $ ( t h i s . r e f s . d a t a g r i d ) . c r e a t e D a t a g r i d ( { t y p e : ' s e a r c h ' , i d : t h i s . p r o p s . q u e r y , s o n g s : t h i s . p r o p s . t r a c k } ) ; } c o m p o n e n t W i l l U n m o u n t ( ) { / / D e s t r o y i n s t a n c e $ ( t h i s . r e f s . d a t a g r i d ) . d e s t r o y ( ) ; } r e n d e r ( ) { r e t u r n < d i v r e f = " d a t a g r i d " > < / d i v > ; } }
modernized our architecture and tooling ES6/2015 with the help of Clear dependency management using Depencency bundling with Replacing custom routing solution with to enforce coding style and good pratices : React speci c linting rules for ESLint Babel npm Browserify React Router ESLint ESLint-plugin-React
Should be cleaned with the migration of the last scripts Every component has state Need to rethink data handling in the whole application (Flux, Redux) Pages are not rendered on server anymore Server rendering with Node.js + React Some unit tests, but not enough :( Mocha, Jest, Enzyme Some di culty migrating existing functional tests
beginning Start small, solve one problem at a time Progressively enhance existing code, do not freeze everything for a rewrite It will take time so have a clear target and a well planned roadmap