1. Lessons Learned from
using in
Production
@PanJ
Panjamapong Sermsawatsri
June, 3 2017
React Bangkok 2.0.0
Pathumwan Institute of Technology
2. Panjamapong (PanJ) Sermsawatsri
CTO at TakeMeTour
Google Developer Expert in Web Technology
@PanJ
June, 3 2017
React Bangkok 2.0.0
Pathumwan Institute of Technology
27. Higher-order Component
• Each page in Next.js is completely separated
• You must use HOC to create a shared
environment
• Styles, Navbar, Redux, i18n, initalProps
32. Styling
• Styled-jsx is painful if you are migrating
component from previous project
• You can use SCSS / postcss / cssnext to help
reduce this pain
• After P’Khame’ session, I recommend
styled-component
33. comes with
• Server-side rendering
• Automatic code-splitting
• Prefetch support
• Inline critical CSS
• Built-in routing
Optimized for SEO
and landing pages
48. Static Caching is
Dangerous
• Every request with same URL will respond the
same content
• Session / Login data must be retrieve in client-
side via componentDidMount
• Side-effect is not allowed in each request (E.g.
counting page view from server-side)