-
Notifications
You must be signed in to change notification settings - Fork 29
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
refactor(application-components): to convert to TS #921
Conversation
<ClassNames> | ||
{({ css: makeClassName }) => ( | ||
<Modal | ||
isOpen={forceClose === true ? false : props.isOpen} |
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.
Now that we useState
, it was a bit weird before to use null
and false
as the state values. Now it's either true
or false
, the outcome should be the same though.
...plication-components/src/components/maintenance-page-layout/maintenance-page-layout.spec.tsx
Show resolved
Hide resolved
packages/application-components/src/components/modal-pages/internals/modal-page.styles.ts
Outdated
Show resolved
Hide resolved
cf5c75d
to
6f248e2
Compare
59273a7
to
f8b1f4b
Compare
@montezume @jonnybel it would be great if you can have a look a this today, thanks |
Will do 👍 |
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.
Ok, I went through the whole PR, which for me it was mostly a TS learning by example experience, and I didn't find anything wrong.
type DialogControllerProps = { | ||
children: (renderProps: { | ||
isOpen: boolean; | ||
setIsOpen: React.Dispatch<boolean>; |
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.
I can't find anything in google (not redux related) about React.Dispatch. can you enlighten?
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.
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.
ah okay. weird
would it be more readable to just put (value: A) => void ?
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.
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.
Everything looks good to me too
Now that we have parts of uikit typed (#919) we can put them into use for the application components. In fact, I already found some bugs! 😮