Skip to content

Commit fa9d61d

Browse files
committed
Run format command
1 parent e450f2b commit fa9d61d

29 files changed

+147
-146
lines changed

docs/api/Provider.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const root = ReactDOM.createRoot(document.getElementById('root'))
8787
root.render(
8888
<Provider store={store}>
8989
<App />
90-
</Provider>
90+
</Provider>,
9191
)
9292
```
9393

@@ -111,6 +111,6 @@ hydrateRoot(
111111
document.getElementById('root'),
112112
<Provider store={clientStore} serverState={preloadedState}>
113113
<App />
114-
</Provider>
114+
</Provider>,
115115
)
116116
```

docs/api/connect.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ The second parameter is normally referred to as `ownProps` by convention.
125125
126126
```js
127127
// binds on component re-rendering
128-
<button onClick={() => this.props.toggleTodo(this.props.todoId)} />
128+
;<button onClick={() => this.props.toggleTodo(this.props.todoId)} />
129129

130130
// binds on `props` change
131131
const mapDispatchToProps = (dispatch, ownProps) => ({
@@ -203,7 +203,7 @@ The fields in the plain object you return from it will be used as the props for
203203
204204
The return value of `mergeProps` is referred to as `mergedProps` and the fields will be used as the props for the wrapped component.
205205
206-
> Note: Creating new values in mergeProps will cause re-renders. It is recommended that you memoize fields in order to avoid unnecessary re-renders.
206+
> Note: Creating new values in mergeProps will cause re-renders. It is recommended that you memoize fields in order to avoid unnecessary re-renders.
207207
208208
### `options?: Object`
209209
@@ -229,7 +229,7 @@ You may pass the context to your connected component either by passing it here a
229229
```js
230230
// const MyContext = React.createContext();
231231
connect(mapStateToProps, mapDispatchToProps, null, { context: MyContext })(
232-
MyComponent
232+
MyComponent,
233233
)
234234
```
235235
@@ -450,7 +450,7 @@ function mapDispatchToProps(dispatch) {
450450
return {
451451
actions: bindActionCreators(
452452
{ ...todoActionCreators, ...counterActionCreators },
453-
dispatch
453+
dispatch,
454454
),
455455
}
456456
}
@@ -472,7 +472,7 @@ function mapStateToProps(state) {
472472
function mapDispatchToProps(dispatch) {
473473
return bindActionCreators(
474474
{ ...todoActionCreators, ...counterActionCreators },
475-
dispatch
475+
dispatch,
476476
)
477477
}
478478

docs/api/hooks.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const root = ReactDOM.createRoot(document.getElementById('root'))
3636
root.render(
3737
<Provider store={store}>
3838
<App />
39-
</Provider>
39+
</Provider>,
4040
)
4141
```
4242

@@ -174,7 +174,7 @@ import { createSelector } from 'reselect'
174174

175175
const selectNumCompletedTodos = createSelector(
176176
(state) => state.todos,
177-
(todos) => todos.filter((todo) => todo.completed).length
177+
(todos) => todos.filter((todo) => todo.completed).length,
178178
)
179179

180180
export const CompletedTodosCounter = () => {
@@ -203,12 +203,12 @@ const selectCompletedTodosCount = createSelector(
203203
(state) => state.todos,
204204
(_, completed) => completed,
205205
(todos, completed) =>
206-
todos.filter((todo) => todo.completed === completed).length
206+
todos.filter((todo) => todo.completed === completed).length,
207207
)
208208

209209
export const CompletedTodosCount = ({ completed }) => {
210210
const matchingCount = useSelector((state) =>
211-
selectCompletedTodosCount(state, completed)
211+
selectCompletedTodosCount(state, completed),
212212
)
213213

214214
return <div>{matchingCount}</div>
@@ -364,7 +364,7 @@ export const CounterComponent = ({ value }) => {
364364
const dispatch = useDispatch()
365365
const incrementCounter = useCallback(
366366
() => dispatch({ type: 'increment-counter' }),
367-
[dispatch]
367+
[dispatch],
368368
)
369369

370370
return (
@@ -573,7 +573,7 @@ export function useActions(actions, deps) {
573573
}
574574
return bindActionCreators(actions, dispatch)
575575
},
576-
deps ? [dispatch, ...deps] : [dispatch]
576+
deps ? [dispatch, ...deps] : [dispatch],
577577
)
578578
}
579579
```

docs/introduction/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const root = ReactDOM.createRoot(document.getElementById('root'))
7575
root.render(
7676
<Provider store={store}>
7777
<App />
78-
</Provider>
78+
</Provider>,
7979
)
8080
```
8181

docs/tutorials/connect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const root = ReactDOM.createRoot(document.getElementById('root'))
9999
root.render(
100100
<Provider store={store}>
101101
<TodoApp />
102-
</Provider>
102+
</Provider>,
103103
)
104104
```
105105

docs/tutorials/quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ root.render(
8080
// highlight-next-line
8181
<Provider store={store}>
8282
<App />
83-
</Provider>
83+
</Provider>,
8484
)
8585
```
8686

docs/using-react-redux/connect-dispatching-actions-with-mapDispatchToProps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const boundIncrement = bindActionCreators(increment, dispatch)
245245
// binding an object full of action creators
246246
const boundActionCreators = bindActionCreators(
247247
{ increment, decrement, reset },
248-
dispatch
248+
dispatch,
249249
)
250250
// returns
251251
// {

docs/using-react-redux/connect-extracting-data-with-mapStateToProps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function mapStateToProps(state, ownProps) {
6969
}
7070

7171
// Later, in your application, a parent component renders:
72-
<ConnectedTodo id={123} />
72+
;<ConnectedTodo id={123} />
7373
// and your component receives props.id, props.todo, and props.visibilityFilter
7474
```
7575

docs/using-react-redux/usage-with-typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const MyComponent = (props: Props) => (
245245
// Typical usage: `connect` is called after the component is defined
246246
export default connect<StateProps, DispatchProps, OwnProps>(
247247
mapState,
248-
mapDispatch
248+
mapDispatch,
249249
)(MyComponent)
250250
```
251251

src/components/Context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { ProviderProps } from './Provider'
66

77
export interface ReactReduxContextValue<
88
SS = any,
9-
A extends Action<string> = UnknownAction
9+
A extends Action<string> = UnknownAction,
1010
> extends Pick<ProviderProps, 'stabilityCheck' | 'identityFunctionCheck'> {
1111
store: Store<SS, A>
1212
subscription: Subscription

0 commit comments

Comments
 (0)