just_me
Solid MotionOne, how to animate presence in list (using For)
I'm trying to animate additions/removals of a list, but am running into problems.
I have this code:
I would expect this to render two list items ('a' and 'b'), but it only renders 'a'. Why does this happen and how can I fix this?
I have created a codesandbox here: https://codesandbox.io/p/devbox/motion-one-list-help-xftq5z?file=%2Fsrc%2FTest.tsx%3A1%2C1-22%2C1
3 replies
TransitionGroup from props derived from store duplicates items
I'm very new to solidjs (this is my first project) and I'm trying to migrate a simple react shoppinglist app to it. Very happy with how everything is working so far, but now I've ran into a problem I can't seem to solve.
I have the following component to which I'm trying to add animations when items are moved around:
When moving items around (by 'checking off' a shopping list item it gets moved to the bottom), there is no animation and the item is duplicated. What am I missing here?
The props.items comes from a createStore which is passed through using a context.
If I omitted some crucial piece of code for trouble shooting, please ask or you can look at the full source code can be found here: https://github.com/Boelensman1/shoppinglist/blob/solid/client-solid/ (copied parts above come from src/App.tsx)
3 replies