'Cause I'm good in spirit, warm-bodied

'Cause I'm good in spirit, warm-bodied

Oh my goodness.

Today's blog post profiles one of the most beautiful songs in existence - "Grandfather please stand on the shoulders of my father while he's deep-sea fishing" - hey man - don't know it 'til you've tried it. Yes the title is weird. Yes it's long.

IT'S ALSO ONE OF THE MOST BEAUTIFUL SONGS THAT YOU HAVE EVER HEARD OR WILL EVER HEAR IN YOUR LIFE.

I CANNOT stop listening to it today.

How beautiful it is.



How much softness and gentleness.

Today's blog post is about state management

Why bother with state management?

State management is very important to software engineering. 

"Component-specific memory is called state". I am not 100% sure what this means. However this helps: "state is data that changes." So therefore: "when the state object changes, the component re-renders".

What this basically means is that:

When new data is available, the individual component(s) can be re-rendered. But the whole page doesn't have to reload. This is especially helpful for when you have bigger applications.

 When you have an app with multiple components, you have to think about how it is that the data, or state, flows between them.

State management "involves handling and manipulating the state of an application or system".

Having used state management before, what I understand it to be is this...

An event happens: a user clicks something, or something is loaded, or whatever. This triggers a change of state. 

The change of state then causes the component to re-render... and I guess to have a new state.

"State management provides a centralised location for storing and managing application state". This allows application programs to have "a single source of truth", I guess. This helps you to keep your data consistent. And it helps to avoid conflicts that may arise from having different conflicting pieces of state.

"Component-specific memory is called state". For smaller and mid-sized apps we might be able to use our own framework's tools for state management. 

But, apparently, as the app gets larger, it can be good to incorporate third part state management tools.

The Perks of State Management

Are you ready? Here we go...
  • Centralised Data Storage
  • Consistent User Interface
  • Data Sharing and Communication
  • Simplified Data Flow
  • Modularity and Reusability
  • State Persistence
  • Time Travel and Debugging
  • Scalability and Performance Optimisation
  • Integration with External Services
  • Predictable State Updates

Context

I have never heard of this term before, in this context (no pun intended... see what I did there?), but it's so cool. From my course: "passing props can become verbose and inconvenient when you need to pass some prop deeply through the tree or if many components need the same prop".

I will write more on this later. Thank you so much!

Comments

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing