feat: Add icons packages for android/ios and consume them in the tab bar #60
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.
This PR adds react-native-vector-icons to to the object-detection sample and uses them in the tab bar.
I've only explicitly included the ionic icon set, which is the one that the sample used and one that I have a little familiarity with, but it should be simple enough to swap that out or add others.
The main thing I'm unsure of in this PR is how I am rendering the tab bar. The sample from react-navigation was in javascript and possibly not "correct" even then since they embedded the tab bar in the settings options, which generated linting errors.
I've extracted the code into a function component and got the types all agreeing. Several questions:
RenderTabBarIcon
, but naming is hardRenderTabBarIcon
be in its own file - my leaning would be yes, but most of the react samples I've been seeing cram a bunch of stuff into one file (and this is a sample).React.FC
for typing since that's what @cdiddy77 suggested elsewhere, but it sounds like this is somewhat controversial in the React community.