File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ We will take a startup point sample _05 Refactor_
2222npm install
2323```
2424
25- - Let's start by adding
26-
2725- Let's start by adding a condition to disable the field whenever is empty.
2826
2927_ ./src/nameEdit.tsx_
@@ -46,13 +44,13 @@ _./src/nameEdit.tsx_
4644 the editingName is empty and when the editing name is the same as the finalname, how
4745 could we do that? We can choose between two options here:
4846
49- - [ Excercise] Add to the disabled option on more condition and cover the case where
47+ - [ Excercise] Add to the disabled option one more condition and cover the case where
5048 the editingName is equal to the initialName.
5149
5250 - Create a generic disable property on the NameEditComponent and let the parent control
5351 decide in which cases it should be disabled (thanks to [ Victor Borrego] ( https://github.com/v-borrego ) to point out this great solution).
5452
55- We will follow the second approach since is the one that can provide more flexiblity to the
53+ We will follow the second approach since is the one that can provide more flexibility to the
5654control (in a real project, choosing between one approach or the other depends on specfication details).
5755
5856We will expose a _ disabled_ property in the _ NameEdit_ component.
You can’t perform that action at this time.
0 commit comments