From 3010ed81365122b339f7dbcdb26899df1871dae9 Mon Sep 17 00:00:00 2001 From: Mark Erikson Date: Thu, 19 Dec 2019 21:35:21 -0800 Subject: [PATCH] Restructure index page sales pitch content based on RTK layout --- website/src/pages/index.js | 308 +++++++++++++++++++++---------------- 1 file changed, 174 insertions(+), 134 deletions(-) diff --git a/website/src/pages/index.js b/website/src/pages/index.js index 6fe65558da..9ed2871698 100755 --- a/website/src/pages/index.js +++ b/website/src/pages/index.js @@ -6,12 +6,140 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext' import useBaseUrl from '@docusaurus/useBaseUrl' import styles from './styles.module.css' +const features = [ + { + content: ( +

+ Redux helps you write applications that{' '} + behave consistently, run in different environments + (client, server, and native), and are easy to test. +

+ ), + image: ( + + + + ), + imageAlign: 'top', + title: 'Predictable' + }, + { + content: ( +

+ Centralizing your application's state and logic enables powerful + capabilities like undo/redo,{' '} + state persistence, and much more. +

+ ), + image: ( + + + + ), + imageAlign: 'top', + title: 'Centralized' + }, + { + content: ( +

+ The Redux DevTools make it easy to trace{' '} + + when, where, why, and how your application's state changed + + . Redux's architecture lets you log changes, use{' '} + "time-travel debugging", and even send complete error + reports to a server. +

+ ), + image: ( + + + + + + + + ), + imageAlign: 'top', + title: 'Debuggable' + }, + { + content: ( +

+ Redux works with any UI layer, and has{' '} + a large ecosystem of addons to fit your needs. +

+ ), + image: ( + + + + ), + imageAlign: 'top', + title: 'Flexible' + } +] + +const otherLibraries = [ + { + content: 'Official React bindings for Redux', + title: 'React-Redux', + link: 'https://react-redux.js.org', + image: ( + + + + ) + }, + { + content: + 'The official, opinionated, batteries-included toolset for efficient Redux development', + title: 'Redux Toolkit', + link: 'https://redux-toolkit.js.org', + image: ( + + ) + } +] + function Home() { const context = useDocusaurusContext() const { siteConfig = {} } = context return (
@@ -31,146 +159,58 @@ function Home() {
+
-
-
-
-
-
- - - -
-

Predictable

-

- Redux helps you write applications that{' '} - behave consistently, run in different - environments (client, server, and native), and are{' '} - easy to test. -

-
-
-
- - - -
-

Centralized

-

- Centralizing your application's state and logic enables - powerful capabilities like undo/redo,{' '} - state persistence, and much more. -

-
-
-
- - - - - - - -
-

Debuggable

-

- The Redux DevTools make it easy to trace{' '} - - when, where, why, and how your application's state changed - - . Redux's architecture lets you log changes, use{' '} - "time-travel debugging", and even send - complete error reports to a server. -

-
-
-
- - - -
-

Flexible

-

- Redux works with any UI layer, and has{' '} - a large ecosystem of addons to fit your - needs. -

+ {features && features.length && ( +
+
+
+ {features.map(({ image, title, content }, idx) => ( +
+ {image && ( +
+ {image} +
+ )} +

+ {title} +

+
{content}
+
+ ))}
-
-
-
-
-
-
-

Other Libraries from the Redux Team

-
- -

- React-Redux - - - - - -

-
-

Official React bindings for Redux

-
-
- -

- Redux Toolkit - - - -

-
-

- The official, opinionated, batteries-included toolset for - efficient Redux development -

+
+ )} + {otherLibraries && otherLibraries.length && ( +
+
+
+
+

+ Other Libraries from the Redux Team +

-
-

Help Us Improve the Redux Docs!

-

- We're planning a revamp of the Redux docs content. Please help - us make the docs better by{' '} - - filling out this survey - - , so we can determine what changes would help the most. - Thanks! -

+
+ {otherLibraries.map(({ image, title, content, link }, idx) => ( +
+

+ + {title} + {image} + +

+

{content}

+
+ ))}
-
-
+ + )}
)