issues
search
CodeSoom
/
ConStu
๋ค? ๋ญ๋ผ๊ณ ์??๐โโ๏ธ ์คํฐ๋๋ฅผ ์ฐพ๊ณ ์๋ค๊ตฌ์?๐ค ์คํฐ๋์ ๊ดํ ์ ๋ณด๋ ๋ชจ๋ ์ฌ๊ธฐ์!!
https://sweet-1cfff.firebaseapp.com
MIT License
28
stars
3
forks
source link
[Feature] Study status changing in real time
#10
Closed
saseungmin
closed
3 years ago
saseungmin
commented
3 years ago
๐ ๊ตฌํ ๋ชฉ๋ก
[x] ์คํฐ๋ ๋ชฉ๋ก์ ์ํ๊ฐ ์ค์๊ฐ์ผ๋ก ๋ณ๊ฒฝ๋๋ค. (๋ชฉ๋ก์ ๋ชจ์ง์ค, ๋ชจ์ง๋ง๊ฐ)
[x]
interval
๋ฅผ ์ฌ์ฉํด์ผ ํ๊ธฐ ๋๋ฌธ์ ์ปค์คํ
useInterval
๋ฅผ ์ฌ์ฉํ๋ค. ๋ฆฌ์กํธ Hooks์์ setInterval์ ์ฌ์ฉํ๋ฉด
๋ฌธ์ ๊ฐ ๋ฐ์
. (์ ๋๋ก ์คํ์ด ์๋จ.)
๐ค ์ถ๊ฐ์ ์ผ๋ก ์งํํ ์ฌํญ๋ค
useInterval
์ ํ ์คํธ๋ฅผ ์์ฑํ๋ ๋ฒ.. coverage๊ฐ 100%๊ฐ ์๋๋ค. ๐ข ์๋๋ฉด ์ด๋ฏธ ๊ตฌํ๋์ด ์๋ ์ปค์คํ ํ ์ npm์ผ๋ก install์ ํ ๊ฒ์ธ๊ฐ.(
use-interval
) ์ฝ๋๋ฅผ ๋ณด๋ ๊ตฌํํ ๋ฐฉ์๋ ๊ฑฐ์ ๊ฐ์.
๐ ๊ตฌํ ๋ชฉ๋ก
interval
๋ฅผ ์ฌ์ฉํด์ผ ํ๊ธฐ ๋๋ฌธ์ ์ปค์คํ useInterval
๋ฅผ ์ฌ์ฉํ๋ค. ๋ฆฌ์กํธ Hooks์์ setInterval์ ์ฌ์ฉํ๋ฉด ๋ฌธ์ ๊ฐ ๋ฐ์. (์ ๋๋ก ์คํ์ด ์๋จ.)๐ค ์ถ๊ฐ์ ์ผ๋ก ์งํํ ์ฌํญ๋ค
useInterval
์ ํ ์คํธ๋ฅผ ์์ฑํ๋ ๋ฒ.. coverage๊ฐ 100%๊ฐ ์๋๋ค. ๐ข ์๋๋ฉด ์ด๋ฏธ ๊ตฌํ๋์ด ์๋ ์ปค์คํ ํ ์ npm์ผ๋ก install์ ํ ๊ฒ์ธ๊ฐ.(use-interval) ์ฝ๋๋ฅผ ๋ณด๋ ๊ตฌํํ ๋ฐฉ์๋ ๊ฑฐ์ ๊ฐ์.