
Save the LIFF ID in the file as follows, since we will refer to it later in the application. Since we are going to open the application from the local environment, we specify as the endpoint URL. Specify both openid and profile for Scope. You will need to create a channel in the LINE Developers Console. yarn add Add a Channel in the LINE Developers Console npx create-react-app redux-toolkit-sample -typescriptĬd redux-toolkit-sample Add Redux Toolkit to your project # NPMĪdd in your project that is required to use LINE Login feature of LINE API. In this article, we will create a simple application that retrieves user information from the LINE API and displays it on the screen, using React project template created with create-react-app and Redux Toolkit.Ĭreate a new React project with create-react-appĬreate a project skeleton by specifying a Typescript with create-react-app command.
#Reduxjs toolkit configurestore code
It abstracts the commonly required code and reduces the amount of code that the developer needed to in regular Redux development. In addition, the Redux Toolkit has the concept of Slicer, which creates the corresponding action types and reducers bypassing the Reducer function and initialState value to it. redux-devtools]() and reselect to view the Store status from the Chrome console. The use of more abstract functions reduces the overall amount of code, lowering the hurdle to using Redux, as well as including common libraries such as redux-thunk for writing asynchronous processing and redux-thunk for viewing Store status from Chrome's console. Reference: Idiomatic Redux: Redux Toolkit 1.0 provide solutions to reduce or eliminate "boilerplate" concerns in using Redux. use opinionated defaults to guide you to "best practicesĤ. make it easier to get started with Redux.ģ.

The main maintainer of Redux and author of the Redux Toolkit, Mark Erikson, writes that he designed this tool with the following intentions.
#Reduxjs toolkit configurestore how to
In this article, I summarized how to use Redux Toolkit in a React project.

This time, I tried using Redux Toolkit, a Redux helper library, and it helped me to use Redux easier and simpler than using regular Redux. One of the bottlenecks using Redux is the number of boilerplates that need to be written: State, Action, Selector, and Reducer.
