Thinking in State & State Shape: React (Absolute Disaster - Part 2 can only be better)

Thinking in State & State Shape: React (Absolute Disaster - Part 2 can only be better) 

This is the task for my react time this morning and it's not going well. I've been blocked on it since I knew it was coming. Some cryptic statements from chat gpt include:

"State is a model of change - not a mirror of your UI"

They say I should be asking myself:
  • "Does this need to change over time?"
  • "Can I calculate this instead?"
  • "What is the simplest shape that still works?"
BRO WHAT ARE THESE SHAPES. 

WHAT ARE THEY. "This session is decision making, not syntax". BRO

TOPIC NUMBER 1: "MULTIPLE USESTATE VERSUS ONE OBJECT"

Separate pieces of changes 
vs.
One bundled piece of change 

React doesn't care - I care because it affects mental load apparently and some stuff - bugs and readability 

MAKE REACT EASY 

"DOES THIS STATE CHANGE TOGETHER OR INDEPENDENTLY?"

CHAT GPT STOP TELLING ME WHAT TO DO. IT IS TELLING ME TO TAKE A MIRO DIAGRAM. INDEPENDENT VS. COUPLED STATE

"DRAW TWO COLUMNS" BRO BRO BRO STOP TELLING ME WHAT TO DO
BRUH

"If updating one field accidentally resets another, that’s a signal."

fuck fuck fuck fuck then 

one topic at a time 
there were more topics in this week but fuck this I am sticking with one topic 

this one 

AI MADE THIS DIAGRAM FOR ME AND I AM NOT PROUD
An AI diagram explaining separate state versus object state

I AM SUPPOSED TO BE DRAWING OUT DIAGRAMS MYSELF BUT IT WAS TOO COMPLICATED (TO READ FROM THE INSTRUCTIONS) (I FIND INSTRUCTIONS VERY HARD TO READ)

update: one of my Lead engineers who mentors me intervened and part 2 will indeed be better we found some amazing react docs stay tuned 
so so grateful 

Comments

Popular posts from this blog

Hello World

“But yesterday, I heard God say, you were born to be the one…”

Yosemite