Skip to content

Commit 7e417c6

Browse files
committed
starting with course project
1 parent bb75c64 commit 7e417c6

131 files changed

Lines changed: 27222 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

epic-react-kent-c-dodds/.DS_Store

0 Bytes
Binary file not shown.

epic-react-kent-c-dodds/04-Advanced-React-Patterns/src/exercise/05.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function toggleReducer(state, {type, initialState}) {
2121
}
2222

2323
// 🐨 add a new option called `reducer` that defaults to `toggleReducer`
24-
function useToggle({initialOn = false} = {}) {
24+
function useToggle({initialOn = false, reduces: toggleReducer} = {}) {
2525
const {current: initialState} = React.useRef({on: initialOn})
2626
// 🐨 instead of passing `toggleReducer` here, pass the `reducer` that's
2727
// provided as an option

0 commit comments

Comments
 (0)