state 선언은 컴포넌트 맨 위에서.
주석
API 주소는 config.js(전역)에서 관리.
// config.js
export const BASE_URL = 'http://---:8000';
export const api = {
  skin: BASE_URL + '/skin',
  login:  BASE_URL + '/login',
};
// skin.js
import { api } from '../../config.js';
fetch(api.skin)how보다는 what for?.// bad
const handleModal = () => {};
// good
const openModal = () => {};