Skip to content

Commit ff41706

Browse files
committed
Move away from depreciated staggerChildren to delayChildren instead
1 parent a5c4266 commit ff41706

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

code/26 Animations/06-animating-staggered-lists/src/components/NewChallenge.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useContext, useRef, useState } from 'react';
2-
import { motion } from 'framer-motion';
2+
import { motion, stagger } from 'framer-motion';
33

44
import { ChallengesContext } from '../store/challenges-context.jsx';
55
import Modal from './Modal.jsx';
@@ -57,10 +57,10 @@ export default function NewChallenge({ onDone }) {
5757
<input ref={deadline} type="date" name="deadline" id="deadline" />
5858
</p>
5959

60-
<motion.ul
61-
id="new-challenge-images"
60+
<motion.ul
61+
id="new-challenge-images"
6262
variants={{
63-
visible: { transition: { staggerChildren: 0.05 } }
63+
visible: { transition: { delayChildren: stagger(0.05) } }
6464
}}>
6565
{images.map((image) => (
6666
<motion.li

0 commit comments

Comments
 (0)