DavidKim
DavidKim•2mo ago

Animating database updates

Lets say I want to mutate data , lets say i have a list of items. I want to animate the deletion of an item in the list or animat ethe addition of an item. How would this be done in react? Is there a way to hook into database updates from the client side?
3 Replies
Convex Bot
Convex Bot•2mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
ari
ari•2mo ago
Similar to what we discussed in this thread (https://discord.com/channels/1019350475847499849/1306827420778889227/1306827420778889227), you can keep track of what the previous data looked like and calculate the set of items that were removed. Animating the removal of a dom node is a bit tricker -- headless ui has a component for that: https://headlessui.com/react/transition
Headless UI
Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
FleetAdmiralJakob 🗕 🗗 🗙
Agree to ari, (framer) motion has some exit animations too

Did you find this page helpful?