Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 2.09 KB

DEPRECATION_AND_MIGRATION_GUIDE.md

File metadata and controls

49 lines (32 loc) · 2.09 KB

Deprecated features and migration guide

Warning

The items mentioned in this part are deprecated and will be removed in a future version.

use_typescript configuration option

The use_typescript configuration option has been deprecated in favour of entrypoint_filename.
It has been done for the following reason(s):

  • To ensure library users are not restricted to the main.{ext} pattern when it comes to the entrypoint

Migration guide

  • Remove the use_typescript from your configuration options
  • Add the entrypoint_filename option to the configuration ; the value would be main.ts if it is your webapp entrypoint's filename.

requests package for SSR

The requests package requirement has been changed for a httpx package requirement.
It has been done for the following reason(s):

  • To leverage the async capabilities of httpx.AsyncClient

Migration guide

  • Install the httpx package
  • (Optionally, if not used elsewhere in your application) Remove the requests package

Use Jinja2 Template instead of a raw HTML string

Remove the usage of raw HTML strings in favour of Jinja2Templates.
It has been done for the following reason(s):

  • So that library users can customize the HTML more easily, without having to override the Inertia object.

Migration guide

  • Create a Jinja2Templates instance, for example one from fastapi.templating.Jinja2Templates. Ensure you have a valid inertia template in the directory given to the instance.
  • Pass this instance to the InertiaConfig, under the templates key
  • Pass the inertia template filename to the InertiaConfig, under the root_template_filename key