array state1 [React] 2-1. array state ์ ๋ ฌํ๊ธฐ ( .sort()ํ์ฉ) ์ด์ ๊ธ โผ ๋๋ณด๊ธฐ 0. 2023.05.05 - [๐ | WEB DEV/React] - [React] 0. React๋ฅผ ์ฌ์ฉํ๋ ์ด์ & ์ด๊ธฐ ์ธํ 1. 2023.05.07 - [๐ | WEB DEV/React] - [React] 1. JSX 2. 2023.05.26 - [๐ | WEB DEV/React] - [React] 2. state (๋ณ์, array, object) array state๋ฅผ ์ ๋ ฌํ๊ณ ์ถ์ ๋๋ ์ด๋ป๊ฒ ํด์ผํ ๊น? ๊ฐ์ฅ ๋ณดํธ์ ์ธ ๋ฐฉ๋ฒ์ธ sort()๋ฉ์๋๋ฅผ ์ด์ฉํด๋ณด์. 1. sort() ํ์ฉํ์ฌ array state ์ ๋ ฌํ๊ธฐ let [music, setMusic] = useState( [{"type": "Rock", "title": "Summer", "singer": "The Volun.. 2023. 5. 27. ์ด์ 1 ๋ค์ ๋ฐ์ํ