강의

멘토링

로드맵

Inflearn Community Q&A

meezinkim1364's profile image
meezinkim1364

asked

Creating NodeBird SNS with React

2-4. Reusing custom hooks

Attempted import error: 'useInput' is not exported from '../pages/signup

Written on

·

231

0

안녕하세요, 밑에 처럼 입력을 했는데 useInput을 Loginform에서 사용할 수 없었어요 ㅠㅠ 어떤 에러인가요? 

signup.js 

export const useInput = (initiative = null) => {
const [value,setter] = useState(initiative);
const handler = useCallback((e) => {
setter(e.target.value);
},[]);
return [value,handler];
};

Loginform.js

import React,{ useCallback } from 'react';
import { useInput } from '../pages/signup';
import { Input, Form, Button } from 'antd';
javascriptreact

Answer 1

1

zerocho님의 프로필 이미지
zerocho
Instructor

서버를 껐다가 다시 시작해보시면 되겠습니다.(서버를 껐다 다시 켜면 빌드가 다시 됩니다)

meezinkim1364's profile image
meezinkim1364

asked

Ask a question