File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export default function App() {
34
34
35
35
const isDragging = useSnapshot (
36
36
// Derives the snapshot. If the Draggable has not yet been created,
37
- // we are sure that the element is not dragging .
37
+ // we are sure that the element is not being dragged .
38
38
(draggable ) => (draggable ? draggable .isDragging : false ),
39
39
// Handles the subscription.
40
40
(draggable , onChange ) => {
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ export default function App({ autoplay = true }) {
27
27
28
28
const isActive = useSnapshot (
29
29
// Derives the snapshot. If the Animation has not yet been created,
30
- // we can rely on "autoplay" to determine if the animation is playing.
30
+ // we can rely on "autoplay" to determine if it will be active when the
31
+ // component will mount.
31
32
(tween ) => (tween ? tween .isActive () : autoplay ),
32
33
// Handles the subscription.
33
34
(tween , onChange ) => {
Original file line number Diff line number Diff line change @@ -72,8 +72,8 @@ function useAnimation({ autoplay }) {
72
72
]);
73
73
74
74
const isPlaying = useSnapshot (
75
- // If the Animation source has not yet been created, we can rely on
76
- // "autoplay" to determine if the animation is playing .
75
+ // If the Animation has not yet been created, we can rely on "autoplay"
76
+ // to determine if it will play when the component will mount .
77
77
(animation ) => (animation ? animation .isPlaying () : autoplay ),
78
78
// Subscribes to "Play"/"Pause" events.
79
79
// We'll dig into it in the next chapter.
You can’t perform that action at this time.
0 commit comments