r/reactnative • u/politicalmeow • Feb 20 '21
Tutorial Book list app using reanimated 2, shared element transitions and lottie
Enable HLS to view with audio, or disable this notification
2
u/introversionguy Feb 20 '21 edited Feb 20 '21
How did you angle the books like that? Is that a skew transform? Or a rotate transform?
2
11
7
1
u/politicalmeow Feb 20 '21 edited Feb 20 '21
Here’s the source code for now, will try to write up a tutorial when I get some time. Forgot to show in the demo, but it supports dark mode as well.
4
1
u/robotpoolparty Feb 20 '21
This is amazing. Tutorial and/or source would be a great help.
btw, seems like reanimated 2 is what everyone's using. But is it production ready? Should I be building apps with it?
3
1
u/BigTamis Feb 25 '21
Hey - this is great stuff! I'm able to run your code on iOS perfectly, however, upon running on my Android Simulator I get the error:
"Exception in HostFunction
java.lang.AssertionError: Illegal type provided
[native code]
updateProps
[native code]
styleUpdater
[native code]
_f
[native code]"
The app crashes very quickly upon opening and am unable to scroll down the stack trace. Do you get this error on Android? Do you or does anyone know what might be causing this issue?
It does mention 'styleUpdater' in the error and so I'm wondering if it has anything to do with the implementation of style in the app.
Thanks!
1
u/politicalmeow Feb 25 '21
I did not test with Android unfortunately. But I suspect it’s Layout Animations. You will need to enable that.
1
u/nic123451 Mar 26 '21
Quick question, from what I can see you get the book data from goodreads. As a noob who would like to implement something similar, but with my own images being uploaded, with title and description. Would I be best served serving them from firebase/headless CMS or should I serve them from an external webpage?
1
u/politicalmeow Mar 27 '21
You can probably get cheap file storage through s3 or digital ocean spaces (cdn) and then serve your api from wherever you see fit. Connect them through some naming convention / id.
→ More replies (1)
5
u/Yokhen Feb 20 '21
Why not do the opposite, whereas all books are slanted except the one being focused on? It would save space, making scrolling faster, AND would give a lot more focus to the item being focused on.
→ More replies (1)
2
2
Feb 22 '21
I'm learning a ton from your source code! Couldn't thank you enough 🙏
That's exactly what I need to get more confident with react native!
1
1
1
115
u/politicalmeow Feb 20 '21 edited Feb 20 '21
Happy to post a tutorial and/or code if anyone’s interested
edit: https://github.com/himanchau/book-app