Skip to content

Commit

Permalink
Merge branch 'main' into missing-versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthurmtro authored Jan 3, 2025
2 parents 6678772 + 542310d commit 3fe0439
Show file tree
Hide file tree
Showing 120 changed files with 4,332 additions and 442 deletions.
3 changes: 3 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
"@remix-run/dev",
"@remix-run/eslint-config",
"@remix-run/express",
"@remix-run/fs-routes",
"@remix-run/node",
"@remix-run/react",
"@remix-run/route-config",
"@remix-run/routes-option-adapter",
"@remix-run/serve",
"@remix-run/server-runtime",
"@remix-run/testing"
Expand Down
315 changes: 221 additions & 94 deletions CHANGELOG.md

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
- apeltop
- appden
- Aprillion
- Ar1f007
- arange
- archwebio
- arekmaz
Expand Down Expand Up @@ -86,6 +87,7 @@
- bogas04
- BogdanDevBst
- bolchowka
- bravo-kernel
- brenr
- brettscott
- brookslybrand
Expand Down Expand Up @@ -231,6 +233,7 @@
- gotgenes
- GOWxx
- graham42
- greg-hoarau
- GregBrimble
- GSt4r
- guatedude2
Expand All @@ -246,6 +249,7 @@
- harmony7
- harshmangalam
- helderburato
- HenryPereira
- HenryVogt
- hi-ogawa
- hicksy
Expand Down Expand Up @@ -372,6 +376,7 @@
- kiyadotdev
- klauspaiva
- klirium
- knisterpeter
- knowler
- konradkalemba
- krolebord
Expand Down Expand Up @@ -450,6 +455,7 @@
- maxrchung
- maxschwarzmueller
- mbarto
- mbuchoff
- mcansh
- mccuna
- mdoury
Expand Down Expand Up @@ -549,13 +555,15 @@
- pyr0gan
- ramiroazar
- RATIU5
- raulfdm
- raulrpearson
- real34
- realjokele
- redabacha
- reggie3
- reichhartd
- remix-run-bot
- rhryansu
- richardhunghhw
- riencoertjens
- risv1
Expand Down Expand Up @@ -592,6 +600,7 @@
- sbernheim4
- schpet
- scott-erickson
- ScottDalessandro
- scottybrown
- sdavids
- sean-roberts
Expand Down Expand Up @@ -625,9 +634,11 @@
- sobrinho
- souredoutlook
- squidpunch
- staticWagomU
- staylor
- stephanerangaya
- stephenwade
- strackfeldt
- SufianBabri
- supachaidev
- syeef
Expand Down
2 changes: 1 addition & 1 deletion docs/file-conventions/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Before we go too far into the Remix convention though, we'd like to point out th

The point is, we are well aware of this and from the get-go, Remix has always given you a first-class way to opt-out via the [`routes`][routes_config]/[`ignoredRouteFiles`][ignoredroutefiles_config] and [configure your routes manually][manual-route-configuration]. But, there has to be _some_ default so that folks can get up and running quickly and easily - and we think that the flat routes convention document below is a pretty good default that scales well for small-to-medium sized apps.

Large applications with hundred or thousands of routes will _always_ be a bit chaotic no matter what convention you use - and the idea is that via the `routes` config, you get to build _exactly_ the convention that works best for your application/team. It would be quite literally impossible for Remix to have a default convention that made everyone happy. We'd much rather give you a fairly straightforward default, and then let the community build any number of conventions you can pick and choose from.
Large applications with hundreds or thousands of routes will _always_ be a bit chaotic no matter what convention you use - and the idea is that via the `routes` config, you get to build _exactly_ the convention that works best for your application/team. It would be quite literally impossible for Remix to have a default convention that made everyone happy. We'd much rather give you a fairly straightforward default, and then let the community build any number of conventions you can pick and choose from.

So, before we dive into the details of the Remix default convention, here's some community alternatives you can check out if you decide that our default is not your cup of tea.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/breadcrumbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default function Root() {
}
```

Note that we pass the `match` object to breadcrumbs, allowing us to potentially utilize `match.data` for enhancing breadcrumb content based on the route's data. This example doesn't use it, but you'll like want to use values from your loader data for the breadcrumb.
Note that we pass the `match` object to breadcrumbs, allowing us to potentially utilize `match.data` for enhancing breadcrumb content based on the route's data. This example doesn't use it, but you'll likely want to use values from your loader data for the breadcrumb.

Using `useMatches` with `handle` offers a robust way for routes to contribute to rendering processes higher up the element tree than their actual render point.

Expand Down
4 changes: 4 additions & 0 deletions docs/guides/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: The quickest way to get rocking and rolling with Remix

# Templates and Stacks

<docs-warning>Just getting started with Remix? The latest version of [Remix is now React Router v7][remix-now-react-router]. If you want to use the latest framework features, you should create your project using a [React Router template][react-router-templates].</docs-warning>

When using [`create-remix`][create_remix] to generate a new project, you can choose a Template or a Stack to quickly get up and running. Templates are minimal starting points to get you up and running. "Stacks" are templates that are more-complete and closer to production ready architectures (potentially including aspects such as testing, database, CI, and deployment configurations).

## Templates
Expand Down Expand Up @@ -170,3 +172,5 @@ After the init script has been run, the `remix.init` folder gets deleted, so you
[arc]: https://arc.codes/docs/en/get-started/quickstart
[deno]: https://deno.com
[cloudflare]: https://www.cloudflare.com
[remix-now-react-router]: https://remix.run/blog/incremental-path-to-react-19
[react-router-templates]: https://github.com/remix-run/react-router-templates
2 changes: 1 addition & 1 deletion docs/hooks/use-fetcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function SomeComponent() {

### `key`

By default, `useFetcher` generate a unique fetcher scoped to that component (however, it may be looked up in [`useFetchers()`][use_fetchers] while in-flight). If you want to identify a fetcher with your own key such that you can access it from elsewhere in your app, you can do that with the `key` option:
By default, `useFetcher` generates a unique fetcher scoped to that component (however, it may be looked up in [`useFetchers()`][use_fetchers] while in-flight). If you want to identify a fetcher with your own key such that you can access it from elsewhere in your app, you can do that with the `key` option:

```tsx lines=[2,8]
function AddToBagButton() {
Expand Down
2 changes: 1 addition & 1 deletion docs/hooks/use-view-transition-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Consider clicking on an image in a list that you need to expand into the hero im
```jsx
function NavImage({ src, alt, id }) {
const to = `/images/${idx}`;
const vt = useViewTransitionState(href);
const vt = useViewTransitionState(to);
return (
<Link to={to} viewTransition>
<img
Expand Down
5 changes: 5 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ hidden: true

# Remix Docs

<docs-warning>Just getting started with Remix? The latest version of [Remix is now React Router v7][remix-now-react-router]. If you want to use the latest framework features, you should use the [React Router docs to get started][react-router-get-started].</docs-warning>

```shellscript nonumber
npx create-remix@latest
```
Expand Down Expand Up @@ -51,3 +53,6 @@ npx create-remix@latest
- **Guides**: They're great for learning how to use Remix in a specific way or for a specific use case.
-->

[remix-now-react-router]: https://remix.run/blog/incremental-path-to-react-19
[react-router-get-started]: https://reactrouter.com/start/framework/installation
4 changes: 4 additions & 0 deletions docs/other-api/create-remix.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: "create-remix (CLI)"

# `create-remix`

<docs-warning>Just getting started with Remix? The latest version of [Remix is now React Router v7][remix-now-react-router]. If you want to use the latest framework features, you should use the [`create-react-router` CLI to start a new project][create-react-router].</docs-warning>

The `create-remix` CLI will create a new Remix project. Without passing arguments, this command will launch an interactive CLI to configure the new project and set it up in a given directory.

```sh
Expand Down Expand Up @@ -86,3 +88,5 @@ If `create-remix` detects any file collisions between the template and the direc
[templates]: ../guides/templates
[remix-app-server]: ./serve
[template-flag-hash-link]: #create-remix---template
[remix-now-react-router]: https://remix.run/blog/incremental-path-to-react-19
[create-react-router]: https://reactrouter.com/start/framework/installation
15 changes: 14 additions & 1 deletion docs/other-api/serve.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ order: 3

# Remix App Server

Remix is designed for you to own your server, but if you don't want to set one up you can use the Remix App Server instead. It's a production-ready, but basic Node.js server built with Express. If you find you want to customize it, use the `@remix-run/express` adapter instead.
Remix is designed for you to own your server, but if you don't want to set one up you can use the Remix App Server instead. It's a production-ready, but basic Node.js server built with Express.

By design, we do not provide options to customize the Remix App Server because if you need to customize the underlying `express` server, we'd rather you manage the server completely instead of creating an abstraction to handle all of the possible customizations you may require. If you find you want to customize it, you should use the `@remix-run/express` adapter instead.

You can see the underlying `express` server configuration in [packages/remix-serve/cli.ts][remix-serve-code]. By default it uses the following Express middlewares (please refer to their documentation for default behaviors):

- [`compression`][compression]
- [`express.static`][express-static] (and thus [`serve-static`][serve-static])
- [`morgan`][morgan]

## `HOST` environment variable

Expand Down Expand Up @@ -83,3 +91,8 @@ In production this doesn't happen. The server boots up and that's the end of it.
[remix-run-express]: ./adapter#createrequesthandler
[singleton]: ../guides/manual-mode#keeping-in-memory-server-state-across-rebuilds
[express-listen]: https://expressjs.com/en/api.html#app.listen
[remix-serve-code]: https://github.com/remix-run/remix/blob/main/packages/remix-serve/cli.ts
[compression]: https://expressjs.com/en/resources/middleware/compression.html
[express-static]: https://expressjs.com/en/4x/api.html#express.static
[serve-static]: https://expressjs.com/en/resources/middleware/serve-static.html
[morgan]: https://expressjs.com/en/resources/middleware/morgan.html
Loading

0 comments on commit 3fe0439

Please sign in to comment.