`use_session` hook
Closed this issue · 1 comments
Archmonger commented
Current Situation
There is no convenient method to fetch the Django and ReactPy sessions from within components.
Proposed Actions
Create a use_session
hook.
This interface could either return a NamedTuple
within ReactPy and Django session objects....
session = use_session()
return f"{session.django} {session.reactpy}"
Or, we could use two separate hooks...
django_session = use_django_session()
reactpy_session = use_reactpy_session()
Archmonger commented
Closing this since I currently see no reason anyone would want to access these sessions within a ReactPy component.
If anyone believes otherwise, feel free to comment on this issue and I'll reopen it.