Skip to content

Commit

Permalink
chore: ASDF
Browse files Browse the repository at this point in the history
  • Loading branch information
crutchcorn committed Sep 12, 2024
1 parent 1a92641 commit a082cf9
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions docs/introduction/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,54 @@ sidebar_label: Getting Started
description: 'Introduction > Getting Started: First steps with Angular Redux'
---

 
# Getting Started with Angular Redux

import LiteYouTubeEmbed from 'react-lite-youtube-embed';
import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css'

# Getting Started with React Redux

[React Redux](https://github.com/reduxjs/react-redux) is the official [React](https://react.dev/) UI bindings layer for [Redux](https://redux.js.org/). It lets your React components read data from a Redux store, and dispatch actions to the store to update state.
[Angular Redux](https://github.com/reduxjs/angular-redux) is the official [Angular](https://angular.dev/) UI bindings layer for [Redux](https://redux.js.org/). It lets your Angular components read data from a Redux store, and dispatch actions to the store to update state.

## Installation

React Redux 8.x requires **React 16.8.3 or later** / **React Native 0.59 or later**, in order to make use of React Hooks.
Angular Redux 8.x requires **Angular 17.3 or later**, in order to make use of Angular Signals.

### Create a React Redux App
### Installing with `ng add`

The recommended way to start new apps with React and Redux is by using [our official Redux+TS template for Vite](https://github.com/reduxjs/redux-templates), or by creating a new Next.js project using [Next's `with-redux` template](https://github.com/vercel/next.js/tree/canary/examples/with-redux).
You can install the Store to your project with the following `ng add` command <a href="https://angular.dev/cli/add" target="_blank">(details here)</a>:

Both of these already have Redux Toolkit and React-Redux configured appropriately for that build tool, and come with a small example app that demonstrates how to use several of Redux Toolkit's features.
```sh
ng add @reduxjs/angular-redux@latest
```

```bash
# Vite with our Redux+TS template
# (using the `degit` tool to clone and extract the template)
npx degit reduxjs/redux-templates/packages/vite-template-redux my-app
#### Optional `ng add` flags

# Next.js using the `with-redux` template
npx create-next-app --example with-redux my-app
```
| flag | description | value type | default value |
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|---------------|
| `--path` | Path to the module that you wish to add the import for the `provideRedux` to. | `string` ||
| `--project` | Name of the project defined in your `angular.json` to help locating the module to add the `provideRedux` to. | `string` ||
| `--module` | Name of file containing the module that you wish to add the import for the `provideRedux` to. Can also include the relative path to the file. For example, `src/app/app.module.ts`. | `string` | `app` |
| `--storePath` | The file path to create the state in. | `string` | `store` |

We do not currently have official React Native templates, but recommend these templates for standard React Native and for Expo:
This command will automate the following steps:

- https://github.com/rahsheen/react-native-template-redux-typescript
- https://github.com/rahsheen/expo-template-redux-typescript
1. Update `package.json` > `dependencies` with Redux, Redux Toolkit, and Angular Redux
2. Run `npm install` to install those dependencies.
3. Update your `src/app/app.module.ts` > `imports` array with `provideRedux({store})`
4. If the project is using a `standalone bootstrap`, it adds `provideRedux({store})` into the application config.

### An Existing React App
### Installing with `npm` or `yarn`

To use React Redux with your React app, install it as a dependency:
To use React Redux with your Angular app, install it as a dependency:

```bash
# If you use npm:
npm install react-redux
npm install @reduxjs/angular-redux

# Or if you use Yarn:
yarn add react-redux
yarn add @reduxjs/angular-redux
```


You'll also need to [install Redux](https://redux.js.org/introduction/installation) and [set up a Redux store](https://redux.js.org/recipes/configuring-your-store/) in your app.

React-Redux v8 is written in TypeScript, so all types are automatically included.
Angular-Redux is written in TypeScript, so all types are automatically included.

## API Overview

Expand Down

0 comments on commit a082cf9

Please sign in to comment.