S
Solara2mo ago
pikaa

Context doesn't update when fetching from a namespace

I'm having some trouble getting a context to be provided then read in a child component properly. At the top-most component, the context is defined, but perhaps because of the import order, it doesn't seem to re-update the context later? When the reading function si called, it only reads it as 'foobar' and doesn't change. Here is the schematic:
pages
├── __init__.py -> [CONTEXT PROVIDED HERE WITH USER UUID]
├── components
│ ├── __init__.py
│ ├── auth
│ │ └── __init__.py
│ ├── dialog.py
│ ├── sidebar
│ │ ├── __init__.py
│ │ ├── autocomplete.py
│ │ ├── glossary.py
│ │ ├── subset_filters.py -> [FUNCTION IS CALLED THROUGHOUT COMPONENTS]
│ │ └── vc_ui.py
│ ├── textfield.py
│ └── views
│ ├── __init__.py
│ ├── dataframe.py
│ ├── grid.py
│ ├── plot_settings.py
│ └── plots.py
├── dataclass
│ ├── __init__.py
│ ├── alert.py
│ ├── filterstore.py -> [CONTEXT READ HERE IN FUNCTION]
│ ├── gridstate.py
│ ├── state.py
│ ├── subsets.py
│ └── vcdata.py
└── util
├── __init__.py
├── regex.py
└── util.py -> [CONTEXT OBJECT DEFINED HERE with 'foobar']
pages
├── __init__.py -> [CONTEXT PROVIDED HERE WITH USER UUID]
├── components
│ ├── __init__.py
│ ├── auth
│ │ └── __init__.py
│ ├── dialog.py
│ ├── sidebar
│ │ ├── __init__.py
│ │ ├── autocomplete.py
│ │ ├── glossary.py
│ │ ├── subset_filters.py -> [FUNCTION IS CALLED THROUGHOUT COMPONENTS]
│ │ └── vc_ui.py
│ ├── textfield.py
│ └── views
│ ├── __init__.py
│ ├── dataframe.py
│ ├── grid.py
│ ├── plot_settings.py
│ └── plots.py
├── dataclass
│ ├── __init__.py
│ ├── alert.py
│ ├── filterstore.py -> [CONTEXT READ HERE IN FUNCTION]
│ ├── gridstate.py
│ ├── state.py
│ ├── subsets.py
│ └── vcdata.py
└── util
├── __init__.py
├── regex.py
└── util.py -> [CONTEXT OBJECT DEFINED HERE with 'foobar']
1 Reply
MaartenBreddels
MaartenBreddels2mo ago
What kind of context? Can you maybe provide a code example (possibly on py.cafe ?)
Want results from more Discord servers?
Add your server