managing state<\/a> in React depending on the complexity of your application and Unstated is a handy library that can make it easier. It\u2019s worth reiterating the point that Redux, while awesome, is not always the best tool for the job, even though we often grab for it in these types of cases. Hopefully you now feel like you have a new tool in your belt.<\/p>\n","protected":false},"excerpt":{"rendered":"As your application becomes more complex, the management of state can become tedious. A component’s state is meant to be self-contained, which makes sharing state across multiple components a headache. Redux is usually the go-to library to manage state in React, however, depending on how complex your application is, you might not need Redux. Unstated […]<\/p>\n","protected":false},"author":251966,"featured_media":270958,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","jetpack_publicize_message":"Unstated is another way to manage state in React.","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":[]},"categories":[4],"tags":[557,1114,1093],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/05\/unstated.jpg?fit=1200%2C600&ssl=1","jetpack-related-posts":[{"id":289062,"url":"https:\/\/css-tricks.com\/managing-state-in-react-using-unstated-next\/","url_meta":{"origin":270954,"position":0},"title":"Managing State in React using Unstated-Next","date":"June 17, 2019","format":false,"excerpt":"In a previous post, we saw how to manage state using Unstated. As you might recall, Unstated uses React\u2019s built-in setState to allow you create components that can consume state by subscribing to a provider \u2014 like the React\u2019s Context API. Well, we\u2019re going to build off that last post\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/05\/unstated.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":330280,"url":"https:\/\/css-tricks.com\/old-is-solid-new-gets-talked-about\/","url_meta":{"origin":270954,"position":1},"title":"Old is Solid; New Gets Talked About","date":"December 15, 2020","format":false,"excerpt":"When Chris asked me to write about \"one thing I learned about building websites this year\" I admit my brain immediately went through a list of techniques and CSS properties I started using this year. But then I paused. Other people can write about that much better than I can.\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-12-15-at-11.58.28-AM.png?fit=1200%2C597&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":302303,"url":"https:\/\/css-tricks.com\/understanding-immutability-in-javascript\/","url_meta":{"origin":270954,"position":2},"title":"Understanding Immutability in JavaScript","date":"January 30, 2020","format":false,"excerpt":"If you haven\u2019t worked with immutability in JavaScript before, you might find it easy to confuse it with assigning a variable to a new value, or reassignment. While it\u2019s possible to reassign variables and values declared using let or var, you'll begin to run into issues when you try that\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/04\/javascript-v4.png?fit=1200%2C400&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":239814,"url":"https:\/\/css-tricks.com\/learning-react-redux\/","url_meta":{"origin":270954,"position":3},"title":"Leveling Up with React: Redux","date":"March 28, 2016","format":false,"excerpt":"This tutorial is the final of a three-part series by Brad Westfall. We'll learn how to manage state across an entire application efficiently and in a way that can scale without dangerous complexity. We've come so far in our React journey, it's worth making it across the finish line here\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":366452,"url":"https:\/\/css-tricks.com\/different-ways-to-write-css-in-react\/","url_meta":{"origin":270954,"position":4},"title":"Different Ways to Write CSS in React","date":"June 22, 2022","format":false,"excerpt":"We\u2019re all familiar with the standard way of linking up a stylesheet to the
of an HTML doc, right? That\u2019s just one of several ways we\u2019re able to write CSS. But what does it look like to style things in a single-page application (SPA), say in a React project?\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/09\/react-recompose-hand.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":366770,"url":"https:\/\/css-tricks.com\/react-hooks-the-deep-cuts\/","url_meta":{"origin":270954,"position":5},"title":"React Hooks: The Deep Cuts","date":"July 13, 2022","format":false,"excerpt":"Hooks are reusable functions. They allow you to use state and other features (e.g. lifecycle methods and so on) without writing a class. Hook functions let us \u201chook into\u201d the React state lifecycle using functional components, allowing us to manipulate the state of our functional components without needing to convert\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2022\/07\/react-hook.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/270954"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/251966"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=270954"}],"version-history":[{"count":13,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/270954\/revisions"}],"predecessor-version":[{"id":271499,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/270954\/revisions\/271499"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media\/270958"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=270954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=270954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=270954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}