-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add Cache-Control to /__remix_manifest responses - Don't call /__remix_data for routes that don't have data loaders - Remove location-based browser data cache, use built-in caching instead - Automatically reload the page when we detect the build has changed - Add `useBeforeUnload` hook for saving state immediately before reload - Add `json` and `redirect` helpers to `@remix-run/loader` Fixes #3 Fixes #4 Fixes #7 Fixes #15
- Loading branch information
Showing
30 changed files
with
1,123 additions
and
1,103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
const { json } = require("@remix-run/loader"); | ||
|
||
module.exports = () => { | ||
return { | ||
users: [ | ||
{ id: "ryanflorence", name: "Ryan Florence" }, | ||
{ id: "mjackson", name: "Michael Jackson" } | ||
] | ||
}; | ||
return json( | ||
{ | ||
users: [ | ||
{ id: "ryanflorence", name: "Ryan Florence" }, | ||
{ id: "mjackson", name: "Michael Jackson" } | ||
] | ||
}, | ||
{ | ||
headers: { | ||
"Cache-Control": "public, max-age=60" | ||
} | ||
} | ||
); | ||
}; |
Oops, something went wrong.