Skip to content

Commit

Permalink
Rework new docs site landing page (#3267)
Browse files Browse the repository at this point in the history
* -dprctd react-router-redux +connected-react-router (#3237)

* -dprctd react-router-redux +connected-react-router

removed... 
**[ReactTraining/react-router-redux](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-redux)**  
Keep your state in sync with your router

 According to their page:  """"Redux users: The react-router-redux package is now deprecated."""""

* Simplify description

* Fix wrong anchor in Store documentation (#3238)

The anchor wasn't matching the target element so it wasn't scrolling.

* Fix link.

Closes #3240

* Removed unnecessary semicolon (#3264)

* Fit bindActionCreators docs more clearly (#3266)

Fix typo - object arguments to object properties
Clear words - single function to action creator for bindActionCreatorss first argument

* Add docs survey link

* Update package-lock.json

* Disable broken separate codeblock CSS link

This is already getting imported directly, and the generated
separate link 404s in prod.

* Tweak header/footer links styles some more

* Add missing "sub-apps" page link

* Add starter kit mentions to "Getting Started"

* Add main logo sales pitch blocks

Added Redux logo next to the main title
Removed "Installation" line
Added selling point headers and paragraphs
Added some Font Awesome icons and a copyright link

* Switch out a couple icons and bump icon sizes
  • Loading branch information
markerikson authored Dec 8, 2018
1 parent 96934e9 commit ee71d78
Show file tree
Hide file tree
Showing 18 changed files with 375 additions and 256 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ It helps you write applications that behave consistently, run in different envir
You can use Redux together with [React](https://reactjs.org), or with any other view library.
It is tiny (2kB, including dependencies).

> **Note**: We are currently planning a rewrite of the Redux docs. Please take some time to **[fill out this survey on what content is most important in a docs site](https://docs.google.com/forms/d/e/1FAIpQLSfzIkY3fXZ8PrQKScYMK0YoEgALfAK2qQ0mOj1_ibKv2qDTuQ/viewform)**. Thanks!
[![build status](https://img.shields.io/travis/reduxjs/redux/master.svg?style=flat-square)](https://travis-ci.org/reduxjs/redux)
[![npm version](https://img.shields.io/npm/v/redux.svg?style=flat-square)](https://www.npmjs.com/package/redux)
[![npm downloads](https://img.shields.io/npm/dm/redux.svg?style=flat-square)](https://www.npmjs.com/package/redux)
Expand Down
2 changes: 1 addition & 1 deletion docs/api/Store.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To create it, pass your root [reducing function](../Glossary.md#reducer) to [`cr
- [`getState()`](#getState)
- [`dispatch(action)`](#dispatch)
- [`subscribe(listener)`](#subscribe)
- [`replaceReducer(nextReducer)`](#replacereducer)
- [`replaceReducer(nextReducer)`](#replaceReducer)

## Store Methods

Expand Down
4 changes: 2 additions & 2 deletions docs/api/bindActionCreators.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Normally you should just call [`dispatch`](Store.md#dispatch) directly on your [

The only use case for `bindActionCreators` is when you want to pass some action creators down to a component that isn't aware of Redux, and you don't want to pass [`dispatch`](Store.md#dispatch) or the Redux store to it.

For convenience, you can also pass a single function as the first argument, and get a function in return.
For convenience, you can also pass an action creator as the first argument, and get a dispatch wrapped function in return.

#### Parameters

Expand Down Expand Up @@ -114,4 +114,4 @@ export default connect(state => ({ todos: state.todos }))(TodoListContainer)

- You might ask: why don't we bind the action creators to the store instance right away, like in classical Flux? The problem is that this won't work well with universal apps that need to render on the server. Most likely you want to have a separate store instance per request so you can prepare them with different data, but binding action creators during their definition means you're stuck with a single store instance for all requests.

- If you use ES5, instead of `import * as` syntax you can just pass `require('./TodoActionCreators')` to `bindActionCreators` as the first argument. The only thing it cares about is that the values of the `actionCreators` arguments are functions. The module system doesn't matter.
- If you use ES5, instead of `import * as` syntax you can just pass `require('./TodoActionCreators')` to `bindActionCreators` as the first argument. The only thing it cares about is that the values of the `actionCreators` properties are functions. The module system doesn't matter.
2 changes: 1 addition & 1 deletion docs/basics/Reducers.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ You'll often find that you need to store some data, as well as some UI state, in
Now that we've decided what our state object looks like, we're ready to write a reducer for it. The reducer is a pure function that takes the previous state and an action, and returns the next state.

```js
;(previousState, action) => newState
(previousState, action) => newState
```

It's called a reducer because it's the type of function you would pass to [`Array.prototype.reduce(reducer, ?initialValue)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce). It's very important that the reducer stays pure. Things you should **never** do inside a reducer:
Expand Down
2 changes: 1 addition & 1 deletion docs/faq/Performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ First, only cache as much data as the user needs. If your application displays a

Second, cache an abbreviated form of a record when possible. Sometimes a record includes data that is not relevant to the user. If the application does not depend on this data, it can be omitted from the cache.

Third, only cache a single copy of a record. This is especially important when records contain copies of other records. Cache a unique copy for each record and replace each nested copy with a reference. This is called normalization. Normalization is the preferred approach to storing relational data for [several reasons](../recipes/reducers/NormalizingStateShape.html#designing-a-normalized-state), including efficient memory consumption.
Third, only cache a single copy of a record. This is especially important when records contain copies of other records. Cache a unique copy for each record and replace each nested copy with a reference. This is called normalization. Normalization is the preferred approach to storing relational data for [several reasons](../recipes/reducers/NormalizingStateShape.md#designing-a-normalized-state), including efficient memory consumption.

#### Further information

Expand Down
4 changes: 2 additions & 2 deletions docs/introduction/Ecosystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,8 @@ Makes integration and unit testing of sagas a breeze
## Routing
**[ReactTraining/react-router-redux](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-redux)**
Keep your state in sync with your router
**[supasate/connected-react-router](https://github.com/supasate/connected-react-router)**
Synchronize React Router 4 state with your Redux store.
**[FormidableLabs/redux-little-router](https://github.com/FormidableLabs/redux-little-router)**
A tiny router for Redux applications that lets the URL do the talking
Expand Down
17 changes: 17 additions & 0 deletions docs/introduction/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ It is also available as a precompiled UMD package that defines a `window.Redux`

For more details, see the [Installation](Installation.md) page.


## Redux Starter Kit

Redux itself is small and unopinionated. We also have a separate package called **[redux-starter-kit](https://redux-starter-kit.js.org/)**,
which includes some opinionated defaults that help you use Redux more effectively.

It helps simplify a lot of common use cases, including [store setup](https://redux-starter-kit.js.org/api/configureStore),
[creating reducers and writing immutable update logic](https://redux-starter-kit.js.org/api/createreducer),
and even [creating entire "slices" of state at once](https://redux-starter-kit.js.org/api/createslice).

Whether you're a brand new Redux user setting up your first project, or an experienced user who wants to
simplify an existing application, **[redux-starter-kit](https://redux-starter-kit.js.org/)** can help you
make your Redux code better.


## Basic Example

The whole state of your app is stored in an object tree inside a single _store_.
Expand Down Expand Up @@ -142,6 +157,8 @@ Going from a TodoMVC app to a real production application can be a big jump, but

The **[#redux channel](https://discord.gg/0ZcbPKXt5bZ6au5t)** of the **[Reactiflux Discord community](http://www.reactiflux.com)** is our official resource for all questions related to learning and using Redux. Reactiflux is a great place to hang out, ask questions, and learn - come join us!

You can also ask questions on [Stack Overflow](https://stackoverflow.com) using the **[#redux tag](https://stackoverflow.com/questions/tagged/redux)**.

## Should You Use Redux?

Redux is a valuable tool for organizing your state, but you should also consider whether it's appropriate for your situation. **Don't use Redux just because someone said you should - take some time to understand the potential benefits and tradeoffs of using it**.
Expand Down
4 changes: 2 additions & 2 deletions src/bindActionCreators.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ function bindActionCreator(actionCreator, dispatch) {
* may be invoked directly. This is just a convenience method, as you can call
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
*
* For convenience, you can also pass a single function as the first argument,
* and get a function in return.
* For convenience, you can also pass an action creator as the first argument,
* and get a dispatch wrapped function in return.
*
* @param {Function|Object} actionCreators An object whose values are action
* creator functions. One handy way to obtain it is to use ES6 `import * as`
Expand Down
25 changes: 24 additions & 1 deletion website/core/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,30 @@ class Footer extends React.Component {
</a>
</div>
</section>
<section className="copyright">{this.props.config.copyright}</section>
<section className="copyright">
{this.props.config.copyright}<br />
Some icons copyright <a
href="https://fontawesome.com/license/free"
style={{color : "white"}}
>
Font Awesome
</a> and <a
href="https://thenounproject.com"
style={{color : "white"}}
>
Noun Project
</a> (<a
href="https://thenounproject.com/term/check/1870817/"
style={{color : "white"}}
>
Hassan ali
</a>, <a
href="https://thenounproject.com/term/debugging/1978252/"
style={{color : "white"}}
>
ProSymbols
</a>)
</section>
</footer>
);
}
Expand Down
Loading

0 comments on commit ee71d78

Please sign in to comment.