Migrating to Warmer Times Ahead

Robbin Xu
Robbin Xu
Apr 23, 2018 · 11 min read

Heads up, we’ve moved! If you’d like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blog

Image for post
Image for post

The problem

Image for post
Image for post
Sourced from Fluxxor’s documentation page here
Image for post
Image for post
The Redux Architecture: Source
Image for post
Image for post
How data flows in a React and Redux Application: Source

Migration Process

Image for post
Image for post
Base gif from https://media.giphy.com/media/lQRwl2XKnHJWE/giphy.gif
Image for post
Image for post
Photo by William Stitt on Unsplash

Actions

Actions are the only way to get data into the store.

The only way to update stores is to send them actions.

Reducers

Reducers are the most important concept in Redux.

Components

Image for post
Image for post
Photo by Massimo Sartirana on Unsplash

Takeaways

[ACTION_TYPE]: (state) => {
return {
...state,
someNestedObject: {
someKey: true,
},
};
}
[ACTION_TYPE]: (state) => {
return state.setIn(['someNestedObject, 'someKey'], true);
}

Future Steps

Summary


Square Corner Blog

Buying and selling sound like simple things - and they…

Robbin Xu

Written by

Robbin Xu

senior software engineering student @uwaterloo. former intern @facebook @square. interested in web performance, distributed systems, databases

Square Corner Blog

Buying and selling sound like simple things - and they should be. Somewhere along the way, they got complicated. At Square, we're working hard to make commerce easy for everyone.

Robbin Xu

Written by

Robbin Xu

senior software engineering student @uwaterloo. former intern @facebook @square. interested in web performance, distributed systems, databases

Square Corner Blog

Buying and selling sound like simple things - and they should be. Somewhere along the way, they got complicated. At Square, we're working hard to make commerce easy for everyone.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade