our site, or use our apps and select from 22 meals each week. • They pick the meals they want to cook and say how many people they’re cooking for. • We deliver all the ingredients they need in exact proportions with step-by-step recipe cards in 2-3 days. • No planning, no supermarkets and no food waste – you just cook (and eat). • We’re a rapidly growing business. About Gousto
side rendering -> write it only once • no need to rewrite all pages, can easily live side by side & share components (header, login, footer) • development speed & saNsfacNon • long term support, ac7ve community (updates, bug fixes, arNcles, tutorials, stackoverflow discussions, ecosystem) • easy testability
works for big apps, easy to update other libraries • SEO: server side rendering, ~95% shared code between client & server • no rewrite: use on new pages, include parts on exisNng pages (server & client) • development: quick ini7al learning, component based approach, full JS, Flux, very acNve community, loads of resources • easily tested (jasmine+karma / mocha+sinon+chai / jest / AVA, enzyme)
& client • State: redux, serialised state is shared between server & client by encoding in HTML response (transit-js) • staNc method on top level component to fetch data on server (and client) • ES.Next (async await, staNc class properNes, destructuring, template, spread, arrow funcNons)
for redux • components: stateless presentaNonal, reusable • containers: connect presentaNonal components to acNons & state • routes: child routes nested Works for big apps, easy to onboard new developer
method - leverage immutability • In a container, only connect the data you need for that specific component, rather than keep passing props top to boaom. Will save a lot of unnecessary re-rendering. • Prefetch data for expected user flow • Split your code by routes to lower page weight
guide is a good start. haps:/ / github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb • haps:/ /github.com/prejer/prejer (beta) • Enforce it by failing builds
be preay linear. Takes ~230ms for 1200 elements (Gousto Menu with 22 recipes) • use a CDN to cache enNre pages (cloudFront, cloudFlare) • server-only above the fold rendering • render caching (not tried) • streaming (not tried)
job for you • Makes life much easier • You feel very cujng edge & cool! • Classes, arrow funcNons, async await, destructuring, let/const, template strings, default value, rest, spread operators, modules, enhanced object literal, Proxy, new types
have a team bigger than 2 • Will help knowledge sharing & speed of development • Eliminate code duplica7on • Will force you to think in reusable component terms • haps:/ /github.com/storybooks/react-storybook haps:/ /github.com/styleguidist/react-styleguidist