Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/exercise/01.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function App() {
```

> You can pull this example up here:
> http://localhost:3000/isolated/examples/counter-before.js
> [/isolated/examples/counter-before.js](http://localhost:3000/isolated/examples/counter-before.js)

I want to focus in on the user of our reducer (the `Counter` component). Notice
that they have to create their own `increment` and `decrement` functions which
Expand Down
6 changes: 3 additions & 3 deletions src/exercise/06.md
Original file line number Diff line number Diff line change
Expand Up @@ -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://react.dev/reference/react-dom/components
<https://react.dev/reference/react-dom/components#form-components>

```javascript
function MyCapitalizedInput() {
Expand Down Expand Up @@ -100,11 +100,11 @@ Warning: Failed prop type: You provided a `value` prop to a form field without a
```

```
Warning: A component is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components
Warning: A component is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable
```

```
Warning: A component is changing a controlled input of type undefined to be uncontrolled. Input elements should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components
Warning: A component is changing a controlled input of type undefined to be uncontrolled. Input elements should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable
```

We should issue the same warnings for people who misuse our controlled props:
Expand Down