CST438 Week 2

React – What I Learned This Week

This week I built a customer order management app using React. Here's what I took away from it.


What I Learned

React is built around components – each piece of the UI (Login, Register, Order, Settings) lives in its own file and manages its own logic. I used useState to handle form inputs, useEffect to fetch data when a page loads, and React Router to navigate between pages without refreshing. I also worked with controlled inputs, where form fields stay in sync with state through onChange handlers, and passed data between components using props.


Strengths

  • Components keep your code organized and focused
  • The declarative style makes it easy to reason about what the UI should look like
  • React Router makes single-page navigation simple to set up
  • The ecosystem has libraries for almost everything

Weaknesses

  • Forms require a lot of repetitive boilerplate for every input field
  • There's no built-in way to share state between components – I had to use sessionStorage as a workaround
  • No built-in HTTP client means you have to handle loading, errors, and responses manually every time
  • Understanding when and why re-renders happen takes some getting used to

Comments

Popular posts from this blog

CST363 Week 4 May 21st - May 27th

CST363 Week 3 May 14th - May 20th

CST489 Week 9