Configure the necessary ReactPy routes on the given app. Parameters: app: An application instance component: A component constructor options: Options for configuring server behavior
(
app: Application,
component: ComponentConstructor,
options: CommonOptions | None = None,
)
| 38 | |
| 39 | # BackendType.configure |
| 40 | def configure( |
| 41 | app: Application, |
| 42 | component: ComponentConstructor, |
| 43 | options: CommonOptions | None = None, |
| 44 | ) -> None: |
| 45 | """Configure the necessary ReactPy routes on the given app. |
| 46 | |
| 47 | Parameters: |
| 48 | app: An application instance |
| 49 | component: A component constructor |
| 50 | options: Options for configuring server behavior |
| 51 | """ |
| 52 | options = options or Options() |
| 53 | _add_handler( |
| 54 | app, |
| 55 | options, |
| 56 | ( |
| 57 | # this route should take priority so set up it up first |
| 58 | _setup_single_view_dispatcher_route(component, options) |
| 59 | + _setup_common_routes(options) |
| 60 | ), |
| 61 | ) |
| 62 | |
| 63 | |
| 64 | # BackendType.create_development_app |
no test coverage detected