useContext가 deprecated 경고가 나오는데 대신 쓸수있는게 있나요?
미해결
프로젝트로 배우는 Vue.js 3
강의중 나오는 useContext를 이용해 emit을 가져오는 코드가 < script > import { useContext } from 'vue' ; export default { setup () { const { emit } = useContext (); const onClick = ( page ) => { emit ( 'click' , page ) }; return { onClick } } } </ script > 크롬 콘솔창에서 경고가 아래와 같이 나오네요 runtime-core.esm-bundler.js?5c40:38 [Vue warn]: `useContext()` has been deprecated and will be removed in the next minor release. Use `useSlots()` and `useAttrs()` instead. useContext()이 deprecated 된다고 나오는데 useContext대신 useSlots(), useAttrs()을 어떻게 활용해야는지 궁금합니다.
- useContext
- 웹앱
- vuejs
- vuex
김영현
댓글 1
좋아요 0
조회수 224





