Skip to content

Commit

Permalink
Merge branch 'master' into chore/remove-full-icu
Browse files Browse the repository at this point in the history
  • Loading branch information
tokerson committed May 17, 2024
2 parents 5431928 + 0d67543 commit 3ddf7bc
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .changeset/sweet-seals-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-starter-boilerplate": minor
---

Change /help page to be a lazy route as an example
5 changes: 5 additions & 0 deletions .changeset/twelve-emus-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-starter-boilerplate": patch
---

Enhance README with instructions on setting up the .env.local file
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# misc
.DS_Store
.env.babelsheet
.env
.env.local

# editor files
.idea/
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ git commit -m 'Initial commit'
git push origin master
```

6. Copy the `.env.dist` file to `.env.local` and populate the environment variables with the values used in the local environment

```shell
cp .env.dist .env.local
```

Now, your project is bootstrapped successfully! 🎉

You can install dependencies and start developing your React application 🚀
Expand Down
27 changes: 16 additions & 11 deletions src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,34 @@

// This file is auto-generated by TanStack Router

import { createFileRoute } from '@tanstack/react-router'

// Import Routes

import { Route as rootRoute } from './routes/__root'
import { Route as IndexImport } from './routes/index'
import { Route as UsersIndexImport } from './routes/users/index'
import { Route as HelpIndexImport } from './routes/help/index'
import { Route as AboutIndexImport } from './routes/about/index'
import { Route as UsersIdIndexImport } from './routes/users/$id/index'

// Create Virtual Routes

const HelpIndexLazyImport = createFileRoute('/help/')()

// Create/Update Routes

const IndexRoute = IndexImport.update({
path: '/',
getParentRoute: () => rootRoute,
} as any)

const UsersIndexRoute = UsersIndexImport.update({
path: '/users/',
const HelpIndexLazyRoute = HelpIndexLazyImport.update({
path: '/help/',
getParentRoute: () => rootRoute,
} as any)
} as any).lazy(() => import('./routes/help/index.lazy').then((d) => d.Route))

const HelpIndexRoute = HelpIndexImport.update({
path: '/help/',
const UsersIndexRoute = UsersIndexImport.update({
path: '/users/',
getParentRoute: () => rootRoute,
} as any)

Expand All @@ -56,14 +61,14 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AboutIndexImport
parentRoute: typeof rootRoute
}
'/help/': {
preLoaderRoute: typeof HelpIndexImport
parentRoute: typeof rootRoute
}
'/users/': {
preLoaderRoute: typeof UsersIndexImport
parentRoute: typeof rootRoute
}
'/help/': {
preLoaderRoute: typeof HelpIndexLazyImport
parentRoute: typeof rootRoute
}
'/users/$id/': {
preLoaderRoute: typeof UsersIdIndexImport
parentRoute: typeof rootRoute
Expand All @@ -76,8 +81,8 @@ declare module '@tanstack/react-router' {
export const routeTree = rootRoute.addChildren([
IndexRoute,
AboutIndexRoute,
HelpIndexRoute,
UsersIndexRoute,
HelpIndexLazyRoute,
UsersIdIndexRoute,
])

Expand Down
7 changes: 7 additions & 0 deletions src/routes/help/index.lazy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { createLazyFileRoute } from '@tanstack/react-router';

import { Help } from 'routes/help/-components/Help';

export const Route = createLazyFileRoute('/help/')({
component: () => <Help />,
});
7 changes: 0 additions & 7 deletions src/routes/help/index.tsx

This file was deleted.

0 comments on commit 3ddf7bc

Please sign in to comment.