-
-
Notifications
You must be signed in to change notification settings - Fork 7
Docs for reactpy-router configuration #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@rmorshea I still have no idea how to integrate this with Django IDOM |
The general usage is: from idom import component
from idom.backend import fastapi
from idom_router import bind, Route
Router = bind(fastapi)
@component
def example():
return Router(
Route(".*', some_other_component()),
...
) The type annotation indicates that from django_idom import hooks
Router = bind(hooks)
... To make bind more general we should do one of the following:
I like option 2 just because I think the syntax of: from idom.backend import fastapi
Router = bind(fastapi) Likewise, I think it also works nicely for Django: from django_idom import hooks
Router = bind(hooks) |
If the only thing we need is If we need the parent module, we can manually fetch it via Then this function potentially gets renamed to |
Currently, the readme doesn't mention how to set this up.
I see there is a
bind
function, but there's no usage information.We need to put some quick documentation into the readme on usage of idom-router.
The text was updated successfully, but these errors were encountered: