Skip to content

Commit 7d7b336

Browse files
authored
Merge pull request #751 from Smashman/patch-1
Edit 'Simple Use Case' in createStructuredSelector to fix apparent issue with demo code
2 parents 7435743 + bf69a67 commit 7d7b336

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/docs/api/createStructuredSelector.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ const selectB = state => state.b
208208
// The result function in the following selector
209209
// is simply building an object from the input selectors
210210
const structuredSelector = createSelector(selectA, selectB, (a, b) => ({
211-
a,
212-
b
211+
x: a,
212+
y: b
213213
}))
214214

215215
const result = structuredSelector({ a: 1, b: 2 }) // will produce { x: 1, y: 2 }

0 commit comments

Comments
 (0)