Giter VIP home page Giter VIP logo

sap-samples / ui5-react-redux-samples Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 7.0 527 KB

Example of how to add Redux and Redux Toolkit to a React UI5 Web Components for React application. The branches correspond with presentations linked in the branches README.

License: Apache License 2.0

HTML 4.41% CSS 2.35% JavaScript 93.18% Shell 0.06%
react redux redux-toolkit rtk-query sample sapui5 ui5-web-components web-development

ui5-react-redux-samples's Introduction

UI5 React Redux Samples

REUSE status

Description

This app is designed to be an example of how to add Redux or Redux Toolkit to a UI5 application.

The branches of this repo correspond with the presentations given. Those presentations are linked in the main readme in each branch.

The main branch of this repo contains all features currently created without any added Redux. Some functionality in other branches may be missing due to the complexity of adding them without Redux. Each presentation will have a snapshot of the main branch from the time the presentations were aired. This is to allow the code to follow along with the presentations, even after time has passed and more features have been added.

Presentations

Original release

This presentation goes over what state management is, Redux, and Redux Toolkit.

The following branches are associated with the presentation:

  • state-management-intro-main
  • state-management-intro-basic-redux
  • state-management-intro-redux-toolkit

This presentation goes over a tool included with Redux Toolkit called RTK Query and why you should use it.

The following branches are associated with the presentation:

  • data-fetching-main
  • data-fetching-rtk-query

Requirements

Git

Node v14 and up

Yarn (optional)

Download and Installation

In order to run the repo, you will need to install Node. All the commands will be written with both NPM and Yarn. Both will work so choose what you want to use.

To clone the repo, open a CLI and navigate to a folder you want to pull the repo into and run the following command: git clone https://github.com/SAP-samples/ui5-react-redux-samples.git

Once downloaded, navigate to the base folder of the repo and install the packages. This is needed to run the application. You can use either of the two commands: npm i yarn install

Once done, you should be able to run the application with either of the following commands: npm start or yarn start

Available Scripts

In the project directory, you can run the following scripts. They are written as NPM scripts followed by Yarn scripts.

npm start | yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test | yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

Redux

The basic Redux example is on branch redux-example. The example using Redux Toolkit is on branch redux-toolkit-example.

Here is the link to the Getting Started page in the Redux Documentation. Note that the official documentation is now based on Redux Toolkit, instead of basic Redux. There are still a lot of articles on adding basic Redux to new projects but the way forward is likely going to be using Redux Toolkit. Knowing both is good as a lot of projects still use basic Redux as the toolkit is very new.

Known Issues

No known issues.

How to obtain support

Create an issue in this repository if you find a bug or have questions about the content.

For additional support, ask a question in SAP Community.

Contributing

If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.

License

Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

ui5-react-redux-samples's People

Contributors

mmoudy49 avatar ospo-bot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.