Skip to content

Commit 42dfc3b

Browse files
authored
docs(cn): improve learn/synchronizing-with-effects translation (#1564)
1 parent 0ab99bf commit 42dfc3b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/learn/synchronizing-with-effects.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ export default function App() {
319319
<>
320320
<input value={text} onChange={e => setText(e.target.value)} />
321321
<button onClick={() => setIsPlaying(!isPlaying)}>
322-
{isPlaying ? 'Pause' : 'Play'}
322+
{isPlaying ? '暂停' : '播放'}
323323
</button>
324324
<VideoPlayer
325325
isPlaying={isPlaying}
@@ -361,10 +361,10 @@ function VideoPlayer({ src, isPlaying }) {
361361

362362
useEffect(() => {
363363
if (isPlaying) {
364-
console.log('Calling video.play()');
364+
console.log('调用 video.play()');
365365
ref.current.play();
366366
} else {
367-
console.log('Calling video.pause()');
367+
console.log('调用 video.pause()');
368368
ref.current.pause();
369369
}
370370
}, [isPlaying]);
@@ -379,7 +379,7 @@ export default function App() {
379379
<>
380380
<input value={text} onChange={e => setText(e.target.value)} />
381381
<button onClick={() => setIsPlaying(!isPlaying)}>
382-
{isPlaying ? 'Pause' : 'Play'}
382+
{isPlaying ? '暂停' : '播放'}
383383
</button>
384384
<VideoPlayer
385385
isPlaying={isPlaying}

0 commit comments

Comments
 (0)