In most production web applications, data come from remote services. So you cannot get the data right away. There are a couple of ways to handle async operations in Redux, such as “redux-saga,” “redux-promise,” etc. But the “redux-thunk” is simple and effective for most scenarios.Continue reading “[Redux] Async in Redux: redux-thunk”
Tag Archives: React
Redux is good at state management, and React is for creating UI components. You can connect React and Redux manually, but there is a great tool that makes the task in a simple way. It is the “react-redux” package.
The “react-redux” creates the “Provider” component and the “connect” function.Continue reading “[Redux] react-redux”
[Redux] Redux Overview
When working with React components, it is critical to have a standardized way to handle the data flow. Flux was a popular state management library of React, but Redux replaces Flux.
Continue reading “[Redux] Redux Overview”
Redux is a pattern and library for managing and updating application state, using events called actions.https://redux.js.org/
Navigation (Routing or Menus) is the basic building block of any web application. React is, in fact, a single-page application that can show different components on request.Continue reading “[React] Navigation”
Functional components create a React component in a simple and clean way but lack some functionalities such as states and life cycle, which class components can provide. “Hooks” is another way to write reusable code and lets you use state and other React features without writing a class.Continue reading “[React] Hooks”
Handling user inputs with forms is the most important part of your web application. React provides the mechanism to work with states with HTML forms.Continue reading “[React] Forms”
It is important to understand the lifecycle of an React component. You can attach the handler to each React Lifecycle. It is useful to set initial states or other tasks at the right moment.Continue reading “[React] Lifecycle”
[React] Props & States
React passes data between components through States and Props.
Props are read-only data that are passed from one component to another. States represent data that change over time. States can only be used in Class components, not in Function components.Continue reading “[React] Props & States”