0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/.changeset/sharp-starfishes-compete.md
Arsh 49aa215a01
Switch app.render signature (#9199)
* feat(app): app.render optional object

* tests

* update vercel and node

* update changeset

* deprecation notice and loggin

* clarify changeset

* add node, vercel changeset

* deduplicate code
2023-11-29 21:08:42 +05:30

20 lines
686 B
Markdown

---
'astro': major
---
This change only affects maintainers of third-party adapters. In the Integration API, the `app.render()` method of the `App` class has been simplified.
Instead of two optional arguments, it now takes a single optional argument that is an object with two optional properties: `routeData` and `locals`.
```diff
app.render(request)
- app.render(request, routeData)
+ app.render(request, { routeData })
- app.render(request, routeData, locals)
+ app.render(request, { routeData, locals })
- app.render(request, undefined, locals)
+ app.render(request, { locals })
```
The current signature is deprecated but will continue to function until next major version.