-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add minimal template #54
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
export default function Home({ loaderData }: Route.ComponentProps) { | ||
return <h1>Hello {loaderData.name}</h1>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to beef this up with a link to the docs or something simple
"scripts": { | ||
"build": "react-router build", | ||
"dev": "react-router dev", | ||
"start": "react-router-serve ./build/server/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this is not marketed as production ready and the README doesn't even mention build
/start
I removed the NODE_ENV
stuff here and the cross-env
dependency. We can add it back in through if folks feel strongly
I definitely like how simple this is, however, as is I don't think this should be the default. We intentionally revamped our templates to be a little prettier. This would be a step backwards to remove it completely. I get that having tailwind as a default for some is more config than necessary. I think with v4 coming so soon this will get even less cumbersome, since tw will simply be a Vite plugin. I also think that for most people, tailwind is a reasonable default if they're just getting started, rapid prototyping, or using the template for teaching. If you remove it it ends up meaning for the majority of people they're going to have an added step of adding it back. Again, I think removing it would be a step backwards if this were the default I'm all for removing the Dockerfile for the default experience, and saying "if you want to learn how to deploy your app, checkout all these ready to deploy options/read this doc that we have" |
This is a slimmed down "minimal" template for
create-react-router
intended not as a production ready solution but a way to easily play with the framework, experiment, create demos, etc.For now, this can be invoked via the
--template
flag but I think we may consider making it the default as well. My hunch is that the majority ofcreate-react-router
executions don't actually result in a production app or a deployment beyondlocalhost
. Users who want that extra complexity can opt into it via--template
.This starts with the default template and removes the following:
<Welcome>
component and associated images in favor of a simplehome.tsx
with a loader and a "Hello World" type componententry.server
/entry.client
files