Syntax - Tasty Web Development Treats
Syntax - Tasty Web Development Treats

All About Redux && Cookies vs JWT

Dev Lifts — Sponsor Dev Lifts will create a personal training plan tailored to your 2018 health and fitness goals. Use the code SYNTAX for $50 off. Join with a friend and we'll make you a Buddy Plan that you can do together (nutrition will still be tailored on a per-individual basis, but workou

Featured Speakers

Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers Host

Topics Discussed

Episode Summary

Executive Summary: The hosts explain Redux as a centralized, immutable application-state store that helps components share and update data predictably, while cautioning that its boilerplate may not suit every app. They cover actions, action creators, reducers, and DevTools, compare Redux with Apollo, and answer a listener question about cookies versus JWTs. A DevLifts fitness-plan sponsorship and upcoming episodes are also mentioned.

Main Topics: Redux’s purpose and when to use it: Redux centralizes application data so components can access or update shared state without passing props through many levels. The hosts say it is useful for complex applications but not necessary for every project. Redux’s store, actions, reducers, and immutability: The store holds the current application state. Code dispatches action objects; reducers use the current state and action to return a new state rather than mutating the existing one. Action creators provide named functions for dispatching actions. Redux trade-offs, learning, and alternatives: The hosts acknowledge Redux’s boilerplate and conceptual overhead, especially for simple examples, but argue its structure and predictability become valuable in real applications. They praise the Redux documentation and discuss Apollo as a less boilerplate-heavy alternative. Cookies and JSON Web Tokens: The listener answer describes cookie-based sessions as credentials automatically sent with requests, and JWTs as tokens that clients can send with requests, often from local storage in single-page apps. The hosts note trade-offs and recommend researching security considerations rather than treating either approach as universally best. DevLifts fitness sponsorship: The sponsor offers developers individualized exercise and nutrition plans, weekly follow-ups, and a community. One host describes using a plan tailored to his goals and limited schedule. Redux learning resources and upcoming episodes: The hosts mention their Redux courses and tutorials, including material focused on learning the concepts through a real application, and preview future topics such as GraphQL and async/await.

Key Arguments: Redux is most useful when multiple components need to access or modify shared application state; its centralized store avoids deeply passing data through component hierarchies. Keeping state immutable and returning a new state object for each change supports predictable updates and enables Redux DevTools features such as inspecting or replaying prior states. Redux’s actions, reducers, and action creators can feel like excessive boilerplate for trivial operations, so the hosts recommend learning through realistic tasks such as fetching API data or controlling shared UI. Redux is not required for every application. Its benefits are more apparent as state and application complexity grow, while simpler projects may not need the additional structure. Cookies and JWTs are different approaches with trade-offs; the discussion presents cookies as common for traditional server-rendered apps and JWTs as a frequent choice for SPAs, while cautioning listeners to research security details.

Data Points: Redux course release timing: By the end of December, as stated at recording time - Scott says his React and Redux course is in editing and expected to be released that month. DevLifts price and discount: $250 listed price; $50 off with code SYNTAX; $199 quoted offer - The transcript states these figures, though subtracting $50 from $250 would be $200, not $199. Fitness goal described: Lose 20 pounds and gain muscle - A host describes the goals used to personalize his DevLifts plan. Workout schedule described: 4 days per week, 45 minutes per session - The host gives his prescribed gym schedule as an example. Episode dates: January 3 and January 10 - The hosts say this mini-episode is expected on January 3 and that the next full episode is planned for January 10. Age of Learn Redux tutorial: About a year and a half - Wes describes when he built the tutorial and notes that Redux’s core ideas remain useful despite older React APIs in the course.

Pivotal Quotes: "And at the end of the day, it's a big object full of the current version of all of your data for your application." — Wes: A plain-language explanation of Redux’s centralized store. "Once you get into the more complex stuff and once you actually start to use it in a real-world application, the benefits are going to definitely pop up." — Scott: The hosts explain why Redux makes more sense in realistic applications than in toy examples. "Getting in shape is easy, or it's simple, but it's not easy." — Wes: A concise description of the challenge behind the DevLifts sponsorship discussion.

Implications: For developers, Redux is a tool for managing shared state predictably—not a default requirement. Learn its concepts through real application needs, and weigh its structure against simpler alternatives. When choosing cookie or JWT authentication, assess the app architecture and security trade-offs rather than relying on blanket recommendations.

🔓 Sign Up for Unlimited Episode Search

About Syntax - Tasty Web Development Treats

View all episodes from Syntax - Tasty Web Development Treats