diff --git a/src/exercise/01.md b/src/exercise/01.md index e16aab30..61fa6113 100644 --- a/src/exercise/01.md +++ b/src/exercise/01.md @@ -190,8 +190,8 @@ I wouldn't recommend this all the time, but sometimes it can be a help! 📜 If you need to review the context API, here are the docs: -- [React Docs - Context](https://reactjs.org/docs/context.html) -- [React Docs - useContext](https://reactjs.org/docs/hooks-reference.html#usecontext) +- [React Docs - Context](https://react.dev/learn/passing-data-deeply-with-context) +- [React Docs - useContext](https://react.dev/reference/react/useContext) 🦉 Tip: You may notice that the context provider/consumers in React DevTools just display as `Context.Provider` and `Context.Consumer`. That doesn't do a diff --git a/src/exercise/02.js b/src/exercise/02.js index 3fc2acc7..2eabc880 100644 --- a/src/exercise/02.js +++ b/src/exercise/02.js @@ -12,8 +12,8 @@ function Toggle() { // props.children to a clone of that child with the props they need using // React.cloneElement. // 💰 React.Children.map(props.children, child => {/* return child clone here */}) - // 📜 https://reactjs.org/docs/react-api.html#reactchildren - // 📜 https://reactjs.org/docs/react-api.html#cloneelement + // 📜 https://react.dev/reference/react/Children + // 📜 https://react.dev/reference/react/cloneElement return } diff --git a/src/exercise/03.js b/src/exercise/03.js index 92355d9a..7b14a136 100644 --- a/src/exercise/03.js +++ b/src/exercise/03.js @@ -5,7 +5,7 @@ import * as React from 'react' import {Switch} from '../switch' // 🐨 create your ToggleContext context here -// 📜 https://reactjs.org/docs/context.html#reactcreatecontext +// 📜 https://react.dev/reference/react/createContext function Toggle({children}) { const [on, setOn] = React.useState(false) @@ -26,7 +26,7 @@ function Toggle({children}) { // 🦉 You can create a helper method to retrieve the context here. Thanks to that, // your context won't be exposed to the user // 💰 `const context = React.useContext(ToggleContext)` -// 📜 https://reactjs.org/docs/hooks-reference.html#usecontext +// 📜 https://react.dev/reference/react/useContext function ToggleOn({on, children}) { return on ? children : null } diff --git a/src/exercise/06.md b/src/exercise/06.md index faf2b625..f25a937a 100644 --- a/src/exercise/06.md +++ b/src/exercise/06.md @@ -20,7 +20,7 @@ Props." This concept is basically the same as controlled form elements in React that you've probably used many times: 📜 -https://reactjs.org/docs/forms.html#controlled-components +https://react.dev/reference/react-dom/components ```javascript function MyCapitalizedInput() {