본문 바로가기

프론트엔드19

리액트 버전 18 - Warning: ReactDOM.render is no longer supported in React 18 - React v18 Warning: ReactDOM.render is no longer supported in React 18 해결하기 기존에 React v17로 개발을 하다가 새로운 사이트를 개발하게 되어서 React 18 버전으로 새롭게 create-react-app을 했다. React 18에서는 ReactDOM.render를 지원하지 않는다는 사실을 모른채 코드를 작성하고 다음과 같은 Warning을 받았다. 더보기 Warning: ReactDOM.render is no longer supported in React 18 !! 😳 놀란 나는 React 공식 사이트에서 react v18에 대해 알아보았다. 👇 참고 ) How to Upgrade to React 18 - 리액트 공식 사이트 Docs https://reac.. 2022. 8. 2.
React로 Lottie 애니메이션 구현하기 React로 Lottie 애니메이션을 구현하는 법 오늘은 Lottie 애니메이션을 React 프로젝트에 사용하는 방법을 기록해보겠습니다! 생각보다 간단하니까 차근차근 따라해주세요 😆 https://lottiefiles.com/ lottie에 대해 궁금하신 분들은 링크로 들어가서 Docs나 open source를 보는것도 좋습니다. Free Lottie Animation Files, Tools & Plugins - LottieFilesThe world’s largest online platform for the world’s smallest animation format for designers, developers, and more. Access Lottie animation tools and plugi.. 2021. 12. 22.
React 프로젝트 Netlify로 배포하기 Create-react-app으로 React 프로젝트를 완성했다면? 완성한 프로젝트를 배포해볼 차례다. 아래의 링크로 들어가보면 https://create-react-app.dev/docs/deployment/ Deployment | Create React App npm run build creates a build directory with a production build of your app. Set up your favorite HTTP server so that a visitor to your site is served index.html, and requests to static paths like /static/js/main..js are served with the contents of t.. 2021. 11. 13.
타입스크립트 4.4 버전 - 뭐가 달라졌을까? (타입스크립트 4.4버전 변경사항) 타입스크립트 4.4 버전에서는 무엇이 달라졌을까? 🤔 해당 글은 타입스크립트 공식 사이트의 What's New를 참고로 작성된 글입니다. Alias된 조건문과 판별문의 제어 흐름 분석 다음은 타입스크립트 공식 사이트에 올라온 글에 있는 예시 코드이다. 타입체크문( typeof )을 사용해 타입이 string이라면 콘솔창에 arg를 대문자로 바꿔서 출력하도록 작성되어있다. 타입체크를 통해 arg가 string 타입일 경우 toUpperCase( )와 같은 메소드를 에러없이 사용할 수 있게 된다. 그리하여 대문자로 변경된 arg 값이 출력이 된다. 위와 달리 아래의 코드는 타입 체크를 argIsString이라는 변수에 할당해서 if 문에 넣게되면 위와는 달리 에러가 나오게 된다. 변수 argIsString에.. 2021. 10. 24.