-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add carousel component #18
Conversation
example/package.json
Outdated
"lint": "eslint . --ext .js,.jsx,.ts,.tsx" | ||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx", | ||
"add-library": "yarn remove @jitera/jitera-rn-ui-library && yarn cache clean && yarn add ../", | ||
"reset": "watchman watch-del '/Users/justinphan/www/jitera-rn-ui-library/example' ; watchman watch-project '/Users/justinphan/www/jitera-rn-ui-library/example'" |
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.
We can simplify the command into:
"reset": "watchman watch-del '/Users/justinphan/www/jitera-rn-ui-library/example' ; watchman watch-project '/Users/justinphan/www/jitera-rn-ui-library/example'" | |
"reset": "watchman watch-del-all'" |
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.
@jefrydco : updated
Anyway, In order for GitHub to able to render the preview, the format of the video should be mp4. |
|
||
return ( | ||
<View ref={ref} style={style} onLayout={handleLayout}> | ||
<FlatList |
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.
it ok to use the library here, cause it has animation and something useful.
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.
@zrg-team You mean we can use external library rather than implementing by ourself?
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.
yes you can use external library
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.
@zrg-team: any suggestion library?
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.
https://github.com/meliorence/react-native-snap-carousel
i think this is the most popular lib
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.
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.
anyway, we can choose another lib, i think there are a lot library out there
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.
Okay if it stable then let go with this one
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.
Maintaining a library like this will take us a lot of time. cause requirement will have animation, etc
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.
@zrg-team : Updated with library above
0c0076e
to
c9ca648
Compare
{...iconSpecificStyle} | ||
{...props} | ||
/> | ||
<View ref={ref} style={style}> |
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.
Icon component is not support ref ? then we have to wrapper ?
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.
Yes it has but seem not stable, sometimes it doesn't work and make project breaking. That's why I wrapped it
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.
ok ok. If it not stable good to go. But keep in mind, the library should have fewer components because passing props with many style objects isn't a good idea, you have more work in Jitera tool
046c86c
to
e258523
Compare
e258523
to
518ef8b
Compare
#Note: Please do not merge as this time. I'm working with jitera-frontend from local to make sure it work before publish
Create carousel component.
Ios Demo:
https://www.loom.com/share/13533b76cf8149029f59aa9c7a7342da