mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
49aa215a01
* 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
20 lines
686 B
Markdown
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.
|