본문 바로가기

[React] Goodbye create-react-app!

[React] Goodbye create-react-app!

https://dev.to/ag2byte/create-react-app-is-officially-dead-h7o

 

Goodbye create-react-app

React developer team recently removed create-react-app from the official documentation. This means it...

dev.to

 

 

1. React developer team recently removed create-react-app from the official documentation. This means it is no longer the default method of setting up a new project in React. According to this pull request on Github, create-react-app is finally gone.

 

There are various ways to setup a new React project. In fact, the official documentation now mentions frameworks like NEXT-JS, Remix etc for beginners. In this post however, we will look into using Vite to setup our React app in under a minute.

 

2. Vite is one of the fastest ways to start a project in react. It has faster server start time. It has better compatibility with plugins. It supports TypeScript, has better dependency resolving features out of the box. React projects created from Vite are just 20% the size of that created by CRA. You can read more about Vite here3

 

-> But Vite is still not 100% replacement for CRA, but is better in all aspects. Plus the official documentation now mentions frameworks like Next.JS as the starting point

 

두 줄 요약 (바쁘면 1번만 봐도 된다.)

1. 리액트 개발 팀에서 공식적으로 create-react-app(이하 CRA)에 대한 문서를 삭제하며, 새로운 프로젝트 환경 세팅을 위해서 NEXT-JS, Remix 등의 프레임워크 사용을 권고한다.

 

2. 바로 위의 포스팅에서는 CRA 대신 모든 면에서 성능이 우수한 Vite 사용을 추천한다. 하지만 바로 아래 댓글에서 아직 초기 버전인 Vite에 대한 치명적인 버그가 있다는 것을 알려주며 리액트 팀의 공식적인 권고는 NEXT.JS 등의 프레임워크 사용이라는 것을 다시 한 번 환기한다.

 

 


 

CRA를 대체할 수 있을 만한 것?

 

그에 대한 사람들의 반응들을 살펴보았다.

 

https://github.com/reactjs/react.dev/pull/5487

 

Replace Create React App recommendation with Vite by t3dotgg · Pull Request #5487 · reactjs/react.dev

Create React App is not a great recommendation to be making, especially for newer developers. As an educator, I run into countless issues w/ new React devs running into unnecessary issues due to th...

github.com

 

아래는 위의 링크에서 가장 많은 공감을 받은 코멘트이다.

 

최고는 없고 최선만 있을 뿐이다. 즉 개발 목적에 따라 툴을 다르게 쓰자는 취지의 코멘트이다.

Totally agree that there are good alternatives to CRA now and React should more prominently feature them. However, as maintainer of Parcel, an alternative to Vite, I would appreciate if React did not play favorites (also with Next.js vs other frameworks). Since CRA was maintained by the React team it kinda made sense, but harder when it's not. Maybe a small description of each option with more details about what it's best for and the tradeoffs vs other options would be good?

if you're building an SPA, Vite and Parcel are good options. Vite is a bundle-less dev server that works with React and other frameworks ... Parcel is an easy to use bundler that works great with React ...

If you're building a server rendered app, Next.js and Remix are good options. Next.js is a React framework with file system routing, server components, ... Remix is a React framework focused on web standards ... I

f you're building a static website, Gatsby is a good option. Gatsby is ...

 

위의 댓글에 대한 다른 의견이다.
무엇보다도 입문자에게는 위의 댓글보다는 하나의 툴을 추천해야 한다는 해당 코멘트도 어느정도 일리가 있다.

Most would agree that the recommendation of CRA needs to be removed, considering it's a dead repo.

But recommending a less optimal solution might be about as bad for a beginner as multiple recommendations.
My completely subjective, gut feel is that vite should be that recommendation. But any active project would be fine. Multiple will just result in analysis paralysis, which kills beginners. More advanced users will find other projects on their own.

At the very minimum, a single recommendation should be made for beginners and any other recommendations segmented away for more advanced devs to investigate for their specific need.

 


 

 

결론적으로 중요한 것은 개발의 목적에 따라 툴에 종속되지 않고 유연하게 사용할 수 있는 개발 경험과 지식을 넓히는 것이다.

 

 

728x90
⬆︎