We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0da2507 commit 3a0e1e5Copy full SHA for 3a0e1e5
docs/reflexes.md
@@ -83,16 +83,17 @@ class ExampleReflex(Reflex):
83
def work(self):
84
# All new instance variables in the reflex will be accessible
85
# in the context during rendering.
86
- self.instance_variable = 'hello world'
+ self.context.instance_variable = 'hello world'
87
88
context = self.get_context_data()
89
context['a_key'] = 'a pink elephant'
90
+
91
+ self.context.update(context)
92
# If "a_key" existed in the context before the reflex was triggered
93
# the context variable will now be modified to "a pink elephant"
94
95
# if it didn't exist, the context variable is then created with the
96
# data "a pink elephant" 🐘
-
97
```
98
{% endtab %}
99
0 commit comments