-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[examples] Better support of Vite examples #37367
Comments
Since CRA is no longer supported and there are many packages that fail to run/install (e.g. TypeScript v5.x), I support the migration to Vite. |
I would like to work on this. I could start with a |
I'd like to help with this too! I can make a |
Do we want to remove CRA examples entirely? See: #37595 (comment). I think we should definitively answer that question before proceeding. |
Happy to help with the migration from CRA to Vite. In most of this examples this should be straightforward as you still use React. |
@samuelsycamore I would personally keep CRA, but only in its basic form. I think that TS & JS examples are enough, no need for examples with other libraries. |
@oliviertassinari Your statement contradicts a bit what you said in your initial post? Od do you mean to have a folder with CRA examples and one with Vite? Anyway CRA is littered with so many stuff there isnt something like "CRA in its basic form". Mui shouldnt lure new people into CRA (with the examples) that is not even recommended by React maintainers. |
@BearCooder I believe what @oliviertassinari meant is that it's enough to have examples of CRA + Material UI, CRA + Base UI, and CRA + Joy UI—no need, for example, to keep additional examples involving CRA + MUI libs + Tailwind CSS (#37595) or other libraries that folks could add to the mix. I agree with this position FWIW. CRA definitely still exists out in the world even if it's fallen out of favor for brand-new projects, so I think there's value in continuing to provide boilerplate examples. |
Let me quote Olivier Tassinari from the beginning of this thread:
"I think that we could either move them to be specialized examples with Vite or create them" I am not sure how to understand that but when simply reading it, for me this sounds like to move to Vite? It might be good to definitely clear the lack of clarity, as I was also gonna start to rewrite examples into Vite and I guess I am not the only one. CRA still exists thats true but its illusory to say it brings value when its clearly not recommended by their own creators. And thats the thing, many will use the example templates as their starter and build on top of it. Thats what we should avoid. In short: |
@BearCooder with all due respect, I think you've misunderstood what @oliviertassinari was saying. "[...] either move them to be specialized examples with Vite or create them". What I'm proposing is the latter—to create new Vite examples and not necessarily trash all of the existing CRA examples. I don't think we need CRA + Material UI + Tailwind, CRA + Material UI + Styled Components, etc. It's enough just to have CRA + Material UI. |
In the interest of moving forward here, let's do this:
|
Can we have an example of Vite + Express + SSR similar to material-ui-express-ssr? |
The ones that make no sense to me to be with CRA and not Vite: https://mui.com/material-ui/getting-started/example-projects/. I think we should migrate those:
|
Summary 💡
Per reactjs/react.dev#5487 and https://npm-stat.com/charts.html?package=vite&package=react-scripts&package=next it doesn't make a lot of sense to have all these Create React App demos.
https://github.com/mui/material-ui/tree/master/examples
I think that we could either move them to be specialized examples with Vite or create them
Examples 🌈
No response
Motivation 🔦
No response
The text was updated successfully, but these errors were encountered: