From ebb9d74e15b935a37f6a816c6e4d98e017e26e96 Mon Sep 17 00:00:00 2001 From: Maya Vera Date: Sun, 9 Jan 2022 12:51:17 -0500 Subject: [PATCH] formatted docs --- docs/api/applyMiddleware.md | 8 ++++---- docs/api/bindActionCreators.md | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/api/applyMiddleware.md b/docs/api/applyMiddleware.md index 6a69191c94..777d31bf30 100644 --- a/docs/api/applyMiddleware.md +++ b/docs/api/applyMiddleware.md @@ -173,15 +173,15 @@ store // I can also dispatch a thunk async action from a component // any time its props change to load the missing data. -import React from 'react'; +import React from 'react' import { connect } from 'react-redux' function SandwichShop(props) { - const { dispatch, forPerson } = props; + const { dispatch, forPerson } = props useEffect(() => { - dispatch(makeASandwichWithSecretSauce(forPerson)); - }, [forPerson]); + dispatch(makeASandwichWithSecretSauce(forPerson)) + }, [forPerson]) return

{this.props.sandwiches.join('mustard')}

} diff --git a/docs/api/bindActionCreators.md b/docs/api/bindActionCreators.md index 2095ff3137..e3e5496e82 100644 --- a/docs/api/bindActionCreators.md +++ b/docs/api/bindActionCreators.md @@ -70,7 +70,10 @@ function TodoListContainer(props) { // We create bound versions of these functions now so we can // pass them down to our child later. - const boundActionCreators = useMemo(() => bindActionCreators(TodoActionCreators, dispatch), [dispatch]); + const boundActionCreators = useMemo( + () => bindActionCreators(TodoActionCreators, dispatch), + [dispatch] + ) console.log(boundActionCreators) // { // addTodo: Function, @@ -87,7 +90,7 @@ function TodoListContainer(props) { // This will work: let action = TodoActionCreators.addTodo('Use Redux') dispatch(action) - }, []); + }, []) return