Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Implement] : FAB #67
[Implement] : FAB #67
Changes from 9 commits
b466d3c
7c8f556
487809f
1c83173
ad7a3d1
2c21481
a4572ab
f2a89e2
4535cf5
afd59c4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
renderProps is not for providing
ReactElement
. It is for reusing renderlogic
.Like you did,
Items - renderItem
is proper use case here. Because it is providing render logic for each item. But If you are just providing ReactElement,children
orslot pattern
is for that use.Additionally, it is better for performance too. Because ReactElement is always newly created for each render if you call
() => ReactElement
function. (Although It has almost no impact here)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 is better to provide consistency on the methods on providing custom component.
Now in this component
renderFABItem
should be provided asrenderProps
so.. I think it is better to providerenderFAB
asrenderProps
.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.
Maybe we can have additional
styles
prop?One for
Animated.View
formain icon
and one foritems
.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.
Although they might have same size in general, I think
FABItem
is responsible for setting size, notFloatingActionButtons
component.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 is pattern from
enzyme
, which is not good practice for testing library.I recommend writing like this.
or
Although later one is new feature and recommended by author, I rarely use it. We can talk about it if you want.
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.
See this for detailed guide for using
testing-library
.