npm @remix-run/node 0.21.0
v0.21.0

latest releases: 0.0.0-nightly-417ecc42b-20241109, 2.14.0, 2.14.0-pre.1...
2 years ago

💅 Features

  • We're on React Router v6! Go change your package.json dependency to "react-router-dom": "^v6.0.0". If you've got "history" in there, you can delete it (it's now just a direct dependency of React Router, your app doesn't need to know about it).
  • You can now get form data directly from the request object! (note that this doesn't yet support multipart/form-data requests, but that is in development right now).
    export function action({ request }) {
      // old
      let body = new URLSearchParams(await request.text());
    
      // new
      let body = await request.formData();
    }
  • Add support for Resource Routes! You can now omit the default export from any route file and the response will be any resource returned from its loader. You can use this to build:
    • RSS feeds
    • dynamically generated images
    • mobile app API routes (so you can reuse the backend logic for both UIs)
    • and lots more!

✨ Improvements

  • You can now add attributes to the <script> tags rendered by <Scripts /> by passing them as props. This allows you to add a Content Security Policy and drop a nonce on the inline scripts that Remix renders so the browser doesn't block them (we'll have a guide soon, but you can read more about CSP on MDN.)
  • Added sourcemaps for server builds.

🐛 Bugfixes

  • Fixed a bug where ?index was included in action requests for index routes.

🗒️ Docs

Full Changelog: v0.20.1...v0.21.0

Don't miss a new node release

NewReleases is sending notifications on new releases.