Skip to content

Commit 314ae7f

Browse files
sveinpgmarkerikson
authored andcommitted
Inital setup of docusaurus (#3165)
* Added metadata to the docs * Added initial docusaurus setup * Removed markdown block * Updated copyright * Removed yarn.lock from gitignore * Updated copyright * . * Add copyright to footer * Added white version of redux-icon to the header * Updated image urls to use https * Fixed spelling * Added script to scroll active sidebar in to viewport. * Moved content from README to a getting started section. * Replaced core concepts link with getting started * Updated docusaurus to 1.5.0 * Moved Structuring Reducers to a subcategory in the sidebar
1 parent c397cf7 commit 314ae7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+9502
-4
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ dist
55
lib
66
es
77
coverage
8+
9+
website/translated_docs
10+
website/build/
11+
website/node_modules
12+
website/i18n/*

docs/FAQ.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: faq
3+
title: FAQ
4+
sidebar_label: FAQ
5+
hide_title: true
6+
---
7+
18
# Redux FAQ
29

310
## Table of Contents

docs/Feedback.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: feedback
3+
title: Feedback
4+
sidebar_label: Feedback
5+
hide_title: true
6+
---
7+
18
# Feedback
29

310
We appreciate feedback from the community. You can post feature requests and bug reports on [Product Pains](https://productpains.com/product/redux).

docs/Glossary.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: glossary
3+
title: Glossary
4+
sidebar_label: Glossary
5+
hide_title: true
6+
---
7+
18
# Glossary
29

310
This is a glossary of the core terms in Redux, along with their type signatures. The types are documented using [Flow notation](http://flowtype.org/docs/quick-reference.html).

docs/Troubleshooting.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: troubleshooting
3+
title: Troubleshooting
4+
sidebar_label: Troubleshooting
5+
hide_title: true
6+
---
7+
18
# Troubleshooting
29

310
This is a place to share common problems and solutions to them.

docs/advanced/AsyncActions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: async-actions
3+
title: Async Actions
4+
sidebar_label: Async Actions
5+
hide_title: true
6+
---
7+
18
# Async Actions
29

310
In the [basics guide](../basics/README.md), we built a simple todo application. It was fully synchronous. Every time an action was dispatched, the state was updated immediately.

docs/advanced/AsyncFlow.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: async-flow
3+
title: Async Flow
4+
sidebar_label: Async Flow
5+
hide_title: true
6+
---
7+
18
# Async Flow
29

310
Without [middleware](Middleware.md), Redux store only supports [synchronous data flow](../basics/DataFlow.md). This is what you get by default with [`createStore()`](../api/createStore.md).

docs/advanced/ExampleRedditAPI.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: example-reddit-api
3+
title: Example: Reddit API
4+
sidebar_label: Example: Reddit API
5+
hide_title: true
6+
---
7+
18
# Example: Reddit API
29

310
This is the complete source code of the Reddit headline fetching example we built during the [advanced tutorial](README.md).

docs/advanced/Middleware.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: middleware
3+
title: Middleware
4+
sidebar_label: Middleware
5+
hide_title: true
6+
---
7+
18
# Middleware
29

310
You've seen middleware in action in the [Async Actions](../advanced/AsyncActions.md) example. If you've used server-side libraries like [Express](http://expressjs.com/) and [Koa](http://koajs.com/), you were also probably already familiar with the concept of _middleware_. In these frameworks, middleware is some code you can put between the framework receiving a request, and the framework generating a response. For example, Express or Koa middleware may add CORS headers, logging, compression, and more. The best feature of middleware is that it's composable in a chain. You can use multiple independent third-party middleware in a single project.
@@ -16,7 +23,7 @@ One of the benefits of Redux is that it makes state changes predictable and tran
1623

1724
Wouldn't it be nice if we logged every action that happens in the app, together with the state computed after it? When something goes wrong, we can look back at our log, and figure out which action corrupted the state.
1825

19-
<img src='http://i.imgur.com/BjGBlES.png' width='70%'>
26+
<img src='https://i.imgur.com/BjGBlES.png' width='70%'>
2027

2128
How do we approach this with Redux?
2229

docs/advanced/NextSteps.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: next-steps
3+
title: Next Steps
4+
sidebar_label: Next Steps
5+
hide_title: true
6+
---
7+
18
# Next Steps
29

310
If you landed in this section, you might be wondering at this point, "what should I do now?". Here is where we provide some essential tips/suggestions on how to diverge from creating trivial TodoMVC apps to a real world application.

docs/advanced/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: advanced
3+
title: Advanced
4+
sidebar_label: Advanced
5+
hide_title: true
6+
---
7+
18
# Advanced
29

310
In the [basics walkthrough](../basics/README.md), we explored how to structure a simple Redux application. In this walkthrough, we will explore how AJAX and routing fit into the picture.

docs/advanced/UsageWithReactRouter.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: usage-with-react-router
3+
title: Usage with React Router
4+
sidebar_label: Usage with React Router
5+
hide_title: true
6+
---
7+
18
# Usage with React Router
29

310
So you want to do routing with your Redux app. You can use it with [React Router](https://github.com/ReactTraining/react-router). Redux will be the source of truth for your data and React Router will be the source of truth for your URL. In most of the cases, **it is fine** to have them separate unless you need to time travel and rewind actions that trigger a URL change.

docs/api/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: api-reference
3+
title: API Reference
4+
sidebar_label: API Reference
5+
hide_title: true
6+
---
7+
18
# API Reference
29

310
The Redux API surface is tiny. Redux defines a set of contracts for you to implement (such as [reducers](../Glossary.md#reducer)) and provides a few helper functions to tie these contracts together.

docs/api/Store.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: store
3+
title: Store
4+
sidebar_label: Store
5+
hide_title: true
6+
---
7+
18
# Store
29

310
A store holds the whole [state tree](../Glossary.md#state) of your application.

docs/api/applyMiddleware.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: apply-middleware
3+
title: applyMiddleware
4+
sidebar_label: applyMiddleware
5+
hide_title: true
6+
---
7+
18
# `applyMiddleware(...middleware)`
29

310
Middleware is the suggested way to extend Redux with custom functionality. Middleware lets you wrap the store's [`dispatch`](Store.md#dispatch) method for fun and profit. The key feature of middleware is that it is composable. Multiple middleware can be combined together, where each middleware requires no knowledge of what comes before or after it in the chain.

docs/api/bindActionCreators.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: bind-action-creators
3+
title: bindActionCreators
4+
sidebar_label: bindActionCreators
5+
hide_title: true
6+
---
7+
18
# `bindActionCreators(actionCreators, dispatch)`
29

310
Turns an object whose values are [action creators](../Glossary.md#action-creator), into an object with the same keys, but with every action creator wrapped into a [`dispatch`](Store.md#dispatch) call so they may be invoked directly.

docs/api/combineReducers.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: combine-reducers
3+
title: combineReducers
4+
sidebar_label: combineReducers
5+
hide_title: true
6+
---
7+
18
# `combineReducers(reducers)`
29

310
As your app grows more complex, you'll want to split your [reducing function](../Glossary.md#reducer) into separate functions, each managing independent parts of the [state](../Glossary.md#state).

docs/api/compose.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: compose
3+
title: compose
4+
sidebar_label: compose
5+
hide_title: true
6+
---
7+
18
# `compose(...functions)`
29

310
Composes functions from right to left.

docs/api/createStore.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: create-store
3+
title: createStore
4+
sidebar_label: createStore
5+
hide_title: true
6+
---
7+
18
# `createStore(reducer, [preloadedState], [enhancer])`
29

310
Creates a Redux [store](Store.md) that holds the complete state tree of your app.

docs/basics/Actions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: actions
3+
title: Actions
4+
sidebar_label: Actions
5+
hide_title: true
6+
---
7+
18
# Actions
29

310
First, let's define some actions.

docs/basics/DataFlow.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: data-flow
3+
title: Data flow
4+
sidebar_label: Data flow
5+
hide_title: true
6+
---
7+
18
# Data Flow
29

310
Redux architecture revolves around a **strict unidirectional data flow**.

docs/basics/ExampleTodoList.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: example
3+
title: Example: Todo List
4+
sidebar_label: Example: Todo List
5+
hide_title: true
6+
---
7+
18
# Example: Todo List
29

310
This is the complete source code of the tiny todo app we built during the [basics tutorial](./README.md). This code is also in [our repository of examples](https://github.com/reduxjs/redux/tree/master/examples/todos/src) and can be [run in your browser via CodeSandbox](https://codesandbox.io/s/github/reduxjs/redux/tree/master/examples/todos).

docs/basics/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: basics
3+
title: Basics
4+
sidebar_label: Basics
5+
hide_title: true
6+
---
7+
18
# Basics
29

310
Don't be fooled by all the fancy talk about reducers, middleware, store enhancers—Redux is incredibly simple. If you've ever built a Flux application, you will feel right at home. If you're new to Flux, it's easy too!

docs/basics/Reducers.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: reducers
3+
title: Reducers
4+
sidebar_label: Reducers
5+
hide_title: true
6+
---
7+
18
# Reducers
29

310
**Reducers** specify how the application's state changes in response to [actions](./Actions.md) sent to the store. Remember that actions only describe _what happened_, but don't describe how the application's state changes.

docs/basics/Store.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: store
3+
title: Store
4+
sidebar_label: Store
5+
hide_title: true
6+
---
7+
18
# Store
29

310
In the previous sections, we defined the [actions](Actions.md) that represent the facts about “what happened” and the [reducers](Reducers.md) that update the state according to those actions.
@@ -59,7 +66,7 @@ unsubscribe()
5966

6067
You can see how this causes the state held by the store to change:
6168

62-
<img src='http://i.imgur.com/zMMtoMz.png' width='70%'>
69+
<img src='https://i.imgur.com/zMMtoMz.png' width='70%'>
6370

6471
We specified the behavior of our app before we even started writing the UI. We won't do this in this tutorial, but at this point you can write tests for your reducers and action creators. You won't need to mock anything because they are just [pure](../introduction/ThreePrinciples.md#changes-are-made-with-pure-functions) functions. Call them, and make assertions on what they return.
6572

docs/basics/UsageWithReact.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: usage-with-react
3+
title: Usage with React
4+
sidebar_label: Usage with React
5+
hide_title: true
6+
---
7+
18
# Usage with React
29

310
From the very beginning, we need to stress that Redux has no relation to React. You can write Redux apps with React, Angular, Ember, jQuery, or vanilla JavaScript.

docs/faq/Actions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: actions
3+
title: Actions
4+
sidebar_label: Actions
5+
hide_title: true
6+
---
7+
18
# Redux FAQ: Actions
29

310
## Table of Contents

docs/faq/CodeStructure.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: code-structure
3+
title: Code structure
4+
sidebar_label: Code structure
5+
hide_title: true
6+
---
7+
18
# Redux FAQ: Code Structure
29

310
## Table of Contents

docs/faq/DesignDecisions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: design-decisions
3+
title: Design decisions
4+
sidebar_label: Design decisions
5+
hide_title: true
6+
---
7+
18
# Redux FAQ: Design Decisions
29

310
## Table of Contents

docs/faq/General.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: general
3+
title: General
4+
sidebar_label: General
5+
hide_title: true
6+
---
7+
18
# Redux FAQ: General
29

310
## Table of Contents

docs/faq/ImmutableData.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: immutable-data
3+
title: Immutable data
4+
sidebar_label: Immutable data
5+
hide_title: true
6+
---
7+
18
# Redux FAQ: Immutable Data
29

310
## Table of Contents

docs/faq/Miscellaneous.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: miscellaneous
3+
title: Miscellaneous
4+
sidebar_label: Miscellaneous
5+
hide_title: true
6+
---
7+
18
# Redux FAQ: Miscellaneous
29

310
## Table of Contents

docs/faq/OrganizingState.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
id: organizing-state
3+
title: Organizing State
4+
sidebar_label: Organizing State
5+
hide_title: true
6+
---
7+
8+
19
# Redux FAQ: Organizing State
210

311
## Table of Contents

docs/faq/Performance.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
id: performance
3+
title: Performance
4+
sidebar_label: Performance
5+
hide_title: true
6+
---
7+
18
# Redux FAQ: Performance
29

310
## Table of Contents

0 commit comments

Comments
 (0)