Yihua Zhang's Projects
Now that we have our cart, it's time to create our checkout page. We need a checkout component for the page and our checkout-item component. We're going to connect the page to our cart reducer; we're also going to make a selector to get the total price.
Creating our first component, homepage and adding scss to help us with writing our styles
We want to be able to remove the item from the cart if the user doesn't want it anymore during checkout so we're going to add the appropriate action and case in our cart reducer.
We also want to be able to update the quantity using buttons to the left and right of the number, so we will add the appropriate code to do so.
We don't want our users to lose their carts whenever they refresh, so we are going to leverage one of the benefits of redux by persisting our store object in localstorage using redux-persist.
We have now created our collection page and converted our shop items data over from an array to an object to better leverage our url parameters! Converting arrays over to objects to store data is called data-normalization and it makes searching for specific elements in our code much easier and efficient!
In this section, we are going to introduce our stripe integration and create a stripe button to help us leverage the stripe checkout library. Stripe is an excellent service that allows us to massively simplify our checkout flow, which would otherwise be incredibly complicated.
We have removed the redux-logger middleware from our production build!
We are now adding styled-components to explore CSS-in-JS. We convert over our Homepage component, Header component and CustomButton component to use styled-components instead of scss.
In this repository, all our components have been converted to styled-components!
In this lesson, we moved our shop data into firebase. We then pull that data into our application and store it into our shop reducer and push it into our shop page.
We've moved our shop data into our firestore database, now we need to modify our application in such a way that considers our data being loaded asynchronously. We have created a WithSpinner HOC as well as modified our shop to initialize the call for data.
The final version of the application after converting our style files to using styled-components.
In this lesson we are using redux-thunk for asynchronous event handling! We have modified our collections-page collections-overview components to use the container pattern to separate their loading logic out of our shop component, and into their own isolated files.
We just added redux-saga into our application! The first thing we need to do is convert our fetchCollectionsStartAsync thunk method into a saga instead fo fetch our collections.
Going through our folder structure for the project, breaking out homepage component into smaller components
In this lesson we are doing a large refactor! We need to convert all our sign in, sign up and authentication persistence checks into sagas. We don't necessarily need to do this for our application, but this is a good way to practice writing sagas in a real world application that may not leverage firebase/firestore or the observer pattern.
In this repo, you will find the code for our project with everything we have done up until now. Make an attempt with all you've learned to create a sign-up flow using the knowledge you have on structuring out saga code!
We have separated out our front-end client from our back-end express server that handles our stripe charges. In this section we learn how to write our express backend server as well as syncing our client to request our backend to complete a stripe charge!
We have added some media query styles to our styled components, try as an exercise to convert the appropriate pages to be mobile responsive!
Let's make our code mobile responsive! We wrote some media queries into the appropriate css files and now we have mobile friendly code!
We have optimized our client side application to leverage react.lazy for lazy loading our components at the route level, but also using the new Suspense feature so we're able to properly render our now asynchronously loaded components!
In this lesson we're adding tests into our application!
Adding routing with react-router, then creating new routes for our existing homepage and our new hats page
Going over the concept of higher order components through use of the withRouter HOC from react-router-dom.
Create collection-preview and collection-item components for the shop page
Creating header component to demonstrate where react-router renders our content on the page using <route> component
Starting our sign in section by creating a new sign in and sign up page, as well as start creating sign in component.
Creating our firebase database and adding the firebase library into our code. Add google sign in and authentication into our application.
Here is our quick CRA application that demonstrates how lifecycles work in class components