-
Notifications
You must be signed in to change notification settings - Fork 89
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
typescript src/room
#437
typescript src/room
#437
Conversation
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.
Comments on things that I am not too confident:
|
||
useEffect(() => { | ||
setState({ json: state }); | ||
setState(state); |
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.
why was it done with the {json: ...}
before? Should the useState be changed to:
useState({json: {}} as {json: State});
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.
Yeah, not sure - would have to ask @robertlong, although I'd probably just remove the json
src src/settings src/auth
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.
Generally looks good on a first pass! On adding deps, just yarn add & commit package.json & yarn.lock as normal.
|
||
useEffect(() => { | ||
setState({ json: state }); | ||
setState(state); |
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.
Yeah, not sure - would have to ask @robertlong, although I'd probably just remove the json
(this depends on: matrix-org/matrix-js-sdk#2527)
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.
This feels very nearly there - this will be most of the app done once its merged!
src/room/GroupCallInspector.tsx
Outdated
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const [context, _] = useState< | ||
[State, React.Dispatch<React.SetStateAction<State>>] | ||
>([{}, () => {}]); |
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.
Did you work out what was going on here? How does the context get set, and what's the weird value provided to the initialiser?
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 added a comment where the context gets set. I also fixed the initial value.
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.
Looks good! Thanks for adding the comment.
For reviewers:
@types/react-router-dom
are there any conventions I have to follow for adding packages?Depends on:
Add missing events from reemitter to GroupCall matrix-org/matrix-js-sdk#2527