Posts
Q&A
์๋ ํ์ธ์ setState ์คํ ์์๊ฐ ์กฐ๊ธ ์ด์ํด์ ์ง๋ฌธ๋จ๊ฒจ์...
ํด๊ฒฐํด์ต๋๋ค. else ๋ถ๋ถ์ผ๋ก ๋์ด๊ฐ๋๊ฒ detatil ํ์ด์ง๋ฅผ ์๋ชป ์์ฑํด์ ๊ทธ๋ฐ๊ฒ ์๋๋ผ hoc์ auth์์ option์ด null ์ธ๊ฒฝ์ฐ์ ์กฐ๊ฑด์ ์๋ชป ์ ์ด๋์ ๊ณ์ detail ํ์ด์ง๋ก ๋ค์ด๊ฐ๋ landing ํ์ด์ง๋ก ์ซ๊ฒจ๋๊ฐ๋ ๊ฒ์ด์์ต๋๋ค.
- 0
- 1
- 260
Q&A
์ฒซ ํ๋ฉด์ด ์ด์ํฉ๋๋ค.
ํด๋ก ์ฝ๋ฉ ๋ ๋ถ๋ถ๋ณด์๋ฉด ์์๊ฒ ์ง๋ง boilerplate์ navbar ๋ถ๋ถ๊ณผ footer ๋ถ๋ถ์ด ๊ตฌํ๋์ด ์์ง์์ ๊ฐ์ ๋ชจ์ต์ผ๋ก๋ ๋์ค์ง ์์ต๋๋ค. ๊ทธ๋ ๊ฒ ๋์ค๋๊ฒ ์ ์์ด์์
- 0
- 1
- 449
Q&A
์ง๋ฌธ์์ต๋๋ค!!!
import React, {useEffect, useState} from 'react' import { FaCode } from "react-icons/fa"; import {API_URL, API_KEY, IMAGE_BASE_URL} from '../../Config' import MainImage from './Sections/MainImage'; function LandingPage() { const [movies, setMovies] = useState([]) const [MainMovieImage, setMainMovieImage] = useState(null) useEffect(() => { const endpoint = `${API_URL}movie/popular?api_key=${API_KEY}&language=en-US&page=1`; fetch(endpoint) .then(response => response.json()) .then(response => { setMovies([response.results]) setMainMovieImage(response.results[0]) }) }, []) return ( { MainMovieImage && } Movies by latest Load More ) } export default LandingPage ๋ณต๋ถํด๋ณด์ธ์ ์ ๋ ๊ฐ์ ์ฆ์์ด์๋๋ฐ ๋ค์ ์ฒ์๋ถํฐ ํ์ดํํ๋ ํด๊ฒฐ๋์์ต๋๋ค. ๋ฌด์จ ๋ฌธ์ ์ธ์ง๋ ๋ชจ๋ฅด๊ฒ ๋ค์...
- 0
- 1
- 225
Q&A
1๋ถ20์ด ๋ถ๋ถ์์ submit์ ๋๋ฌ๋ ๋ฐ์์ด ์๋๋ฐ ์ด๋ค๋ฌธ์ ์ผ๊น์???
์คํ์ผ ๊ฐ๋ฅ์ฑ์ด ํด๊ฑฐ๊ฐ์์ ์์ ์ ์ง ๋๋ฌ์ ์ฝ๋ ์คํ ํ์ธ ํด๋ณด์ธ์
- 0
- 2
- 367




