-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to React 18 #1100
base: main
Are you sure you want to change the base?
Upgrade to React 18 #1100
Changes from all commits
7c30f46
733a5fc
b949c20
231954c
f4e20ff
8b5d061
7777f19
f9ce89b
775cdca
09814f4
8bc06e7
18fb0da
d1b897c
aadfac6
bccf0fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ export default { | |
const ControlledTemplate: Story<DateInputProps> = (args) => { | ||
const [value, setValue] = useState<string>('2005-01-03'); | ||
const onValueChange = useCallback( | ||
(newValue) => { | ||
(newValue: any) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the type of |
||
console.log(`new value = ${newValue}`); | ||
setValue(newValue as string); | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,15 +21,15 @@ export const ControlledLinked: Story<DateRangeInputProps> = () => { | |
// there must be a cleverer way to do this | ||
// avoiding the cut and paste | ||
const handleChangeA = useCallback( | ||
(newRange) => { | ||
(newRange: any) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, this would be Ultimately, we should fix |
||
console.log(`A: new range = ${newRange.min} to ${newRange.max}`); | ||
setRange(newRange); | ||
}, | ||
[setRange] | ||
); | ||
|
||
const handleChangeB = useCallback( | ||
(newRange) => { | ||
(newRange: any) => { | ||
console.log(`B: new range = ${newRange.min} to ${newRange.max}`); | ||
setRange(newRange); | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ export default { | |
const ControlledTemplate: Story<NumberInputProps> = (args) => { | ||
const [value, setValue] = useState<number | undefined>(args.value ?? 1); | ||
const onValueChange = useCallback( | ||
(newValue) => { | ||
(newValue: any) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar comment as above, about |
||
console.log(`new value = ${newValue}`); | ||
setValue(newValue as number); | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use
unknown
instead ofany
. It's a safer type to use, especially in this case where we don't want do anything with the parameter.