Skip to content

chandrakiran-dev/lwc-redux

Repository files navigation

Introducing Redux with Lightning web components(LWC)

LWC-redux is a LWC binding for Redux. It will allow your Lightning Web Components to read data from a Redux store, and dispatch actions to the store to update data.

LWC-redux helps you to write application that behaves consistently and provide state management to the application. It's also separate the JS business and design layers.

Installation

To install the LWC-redux, we only need to click on the below button. It will redirect you to another page where you can select production/sandbox org and proceed with 'Login to Salesforce' button. Click here to install

There are two types of developer processes or models supported in Salesforce Extensions for VS Code and Salesforce CLI. These models are explained below. Each model offers pros and cons and is fully supported.

Why Use LWC Redux?

Redux itself is a standalone library that can be used with any UI layer or framework, including LWC, React, Angular, Vue, Ember, and vanilla JS. Although Redux and React are commonly used together, they are independent of each other.

If you are using Redux with any kind of UI framework, you will normally use a "UI binding" library to tie Redux together with your UI framework, rather than directly interacting with the store from your UI code.

LWC Redux is the Redux UI binding library for LWC. If you are using Redux and LWC together, you should also use LWC Redux to bind these two libraries.

It is the Redux UI Bindings for LWC.
It Encourages Good LWC Architecture.
It Implements Performance Optimizations For You

Click here for more information

Basic Tutorial

To see how to use LWC Redux in practice, we’ll show a step-by-step example by creating a todo list app.

Click here for basic tutorial

Examples

Go to Examples folder in the repository or refer examples page

CCI Integration

Add to your cumulusci.yml:

sources:
  lwc-redux:
    github: https://github.com/chandrakiran-dev/lwc-redux

Add to your cci flow:

task: lwc-redux:deploy
options:
    path: force-app/main/default