-
Notifications
You must be signed in to change notification settings - Fork 734
UILib Packages #723
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
UILib Packages #723
Conversation
const packages = [ | ||
{ | ||
filename: 'keyboard.js', | ||
content: `module.exports = require('./lib/components/Keyboard').default;\n` |
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 not use 'components: [keyboard]'? It's clearer and you can add other keyboard components in the future.
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.
Take a look at ./lib/components/Keyboard
It already contains all the various Keyboard components we have.
The user will be able to import it like this
import {KeyboardTrackingView, KeyboardAwareInsetsView, KeyboardRegistry, ...} from 'react-native-ui-lib/keyobard';
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 see. mmm... I still think it's clearer to use the same object format, seems less random. Your call.
Very cool!!! |
This PR include a script for generating custom, partial packages for uilib.
What does it mean?
It means the user will be able to import a single component in the following way
Why is it important?
By not importing the whole library and only specific components you
(Today uilib is 33% of bundle size of a new empty project)