[ToyProject-Todomate] ํˆฌ๋‘๋ฉ”์ดํŠธ ํด๋ก  ํ”„๋กœ์ ํŠธ 08

2021. 12. 13. 01:24ใ†WEB Dev/ToyProject

728x90


๐Ÿ”ท CloneTodo โ˜‘ - Todomate Clone Project  |  Team CloneMate

 

CloneTodo : ๋งŽ์€ ์‚ฌ๋žŒ๋“ค์ด ์‚ฌ๋ž‘ํ•˜๋Š” ํˆฌ๋‘๋ฉ”์ดํŠธ๋ฅผ ํด๋ก ํ•˜์—ฌ ์›น ์„œ๋น„์Šค๋ฅผ ๋ฐฐํฌํ•ด๋ณด๋Š” ํ”„๋กœ์ ํŠธ

 


 

์•„๊นŒ๊นŒ์ง€ ์ž‘์„ฑํ•œ ๊ธ€์„ ์ „๋ถ€ ๋‚ ๋ฆฌ๊ณ  ์Šฌํ””์— ํœฉ์‹ธ์˜€๋‹ค.

 

 

์ง€๊ธˆ๊นŒ์ง€ ํ•œ ๊ฒƒ์€ ์ €๋ฒˆ์— ๋งŒ๋“  ํšŒ์›๊ฐ€์ž…, ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ์— ์ด๋™ ํ•˜๋Š” ๊ธฐ๋Šฅ์„ ์—ฐ๊ฒฐํ•˜๋Š” ๊ฒƒ์ด๋‹ค.

๊ฐ„๋‹จํ•˜๊ฒŒ ๋ผ์šฐํ„ฐ๋ฅผ ์ด์šฉํ•˜๋ฉด ์‰ฝ๊ฒŒ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์„ ์ค„ ์•Œ์•˜๋Š”๋ฐ, button์— onClick์œผ๋กœ ์ด๋ฒคํŠธ๋ฅผ ์ƒ์„ฑํ•˜๋ ค๊ณ  ํ–ˆ๋”๋‹ˆ  

Link to ๋กœ๋Š” ์•ˆ๋œ๋‹ค๊ณ  ํ•ด์„œ useHistory๋ฅผ ์ด์šฉํ•˜๊ณ  ์žˆ์—ˆ๋‹ค.

 

์šฐ์„  ๋ผ์šฐํ„ฐ๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š”๋ฐ ์ด ๋ถ€๋ถ„์€ ๋ณ„๋„๋กœ ์„ค๋ช…์„ ํ•˜์ง€ ์•Š๊ณ  (์ผ๋Š”๋ฐ ๋‚ ๋ผ๊ฐ€์„œ ์˜์š• ์žƒ์Œ)

์ฐธ๊ณ ํ–ˆ๋˜ ๋ธ”๋กœ๊ทธ์˜ ์ฃผ์†Œ๋ฅผ ์ฒจ๋ถ€ํ•œ๋‹ค.

 

๊ฐ€์žฅ ์ค‘์š”ํ•œ๊ฑด useHistory๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ–ˆ์œผ๋‚˜!

์ตœ์‹  ๋ฒ„์ „์˜ ๋ฆฌ์•กํŠธ์—์„œ๋Š” useHistory๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  useNavigator๋ฅผ ์ด์šฉํ•œ๋‹ค๊ณ  ํ•ด์„œ!

(๋งํ•  ํ”„๋ก ํŠธ์—”๋“œ์˜ ๋น ๋ฅธ ๋ณ€ํ™”์™€ ํ๋ฆ„!)

useNavigator๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•์„ ํ™•์ธํ•˜๊ณ  ์ ์šฉํ•ด๋ณด์•˜๋‹ค.

 

 

useNavigate tutorial React JS

Hi guys !. In this post we will learn how to use the useNavigate hook in React JS. useNavigate is...

dev.to

 

react-router :: 1์žฅ. ๋ฆฌ์•กํŠธ ๋ผ์šฐํ„ฐ ์‚ฌ์šฉํ•ด๋ณด๊ธฐ | VELOPERT.LOG

์ด ํŠœํ† ๋ฆฌ์–ผ์€ 3๊ฐœ์˜ ํฌ์ŠคํŠธ๋กœ ๋‚˜๋‰˜์–ด์ง„ ์ด์–ด์ง€๋Š” ๊ฐ•์ขŒ์ž…๋‹ˆ๋‹ค. ๋ชฉ์ฐจ๋ฅผ ํ™•์ธํ•˜์‹œ๋ ค๋ฉด ์—ฌ๊ธฐ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”. SPA ๋ž€? Single Page Application (์‹ฑ๊ธ€ ํŽ˜์ด์ง€ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜) ์˜ ์•ฝ์ž์ž…๋‹ˆ๋‹ค. ๋ง ๊ทธ๋Œ€๋กœ, ํŽ˜์ด์ง€

velopert.com

 

 

[ React ] ๋ฆฌ์•กํŠธ ๋ผ์šฐํ„ฐ React-Router

์ด๋ฒˆ ๊ฒŒ์‹œ๊ธ€์—์„  ๊ฐ„๋‹จํ•˜๊ฒŒ ๋ฆฌ์•กํŠธ-๋ผ์šฐํ„ฐ(React-Router)๊ฐ€ ๋ญ”์ง€ ์•Œ์•„๋ณด๊ณ  ์‚ฌ์šฉํ•  ์˜ˆ์ •์ด๋‹ค. โ€‹ โ€‹ ๋ฆฌ์•กํŠธ-๋ผ์šฐํ„ฐ(React-Router)๋ž€?โ€‹ ๋ฆฌ์•กํŠธ๋Š” SPA(Single Page Application) ๋ฐฉ์‹์œผ๋กœ ์—ฌ๋Ÿฌ ๊ฐœ์˜ ํŽ˜์ด์ง€๋ฅผ ์ด์šฉ

mjn5027.tistory.com

 

 

๊ทผ๋ฐ ๊ณ„์† 'useNavigate() may be used only in the context of a <Router> component.' ์ด๋ผ๋Š” ์˜ค๋ฅ˜ ๋•Œ๋ฌธ์— ์•„๋ฌด๊ฒƒ๋„ ๋ชปํ•˜๊ณ  ์žˆ๋‹ค. ใ… ใ… 

 

 

 

728x90