-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
example/src/shared/utils.ts
Outdated
@@ -10,3 +10,12 @@ export const getShortUsername = (username: string) => { | |||
.join('') | |||
.toUpperCase(); | |||
}; | |||
|
|||
/** | |||
* Used to check whether string contains only whitespaces. |
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.
No need to document that, it's in the function name and the types.
Comments like this make code less readable. In time the function might change and we'll most likely forget to update the comment.
Good comments are explaining things that are not obvious (for example "I'm doing this like that because there is an issue #1234 with RN"). What the function does should be obvious from the function name and you're doing a good job creating small, well named functions 👍
Also I'm adding comments like this one but to the public API to automatically generate public docs. But this function is not a public API.
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.
Remved.
example/src/screens/CreateRoom.tsx
Outdated
@@ -90,7 +117,26 @@ export const CreateRoom = ({ navigation, route }: Props) => { | |||
}, []); | |||
|
|||
return ( | |||
<BackgroundWrapper hasHeader> | |||
<Animated.View |
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 think it's a bit repetitive. Can we extract this to a separate component and reuse?
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.
Added a new component.
This changes fix the background in place during transitions between screens.