-
Notifications
You must be signed in to change notification settings - Fork 210
Add documentation for rx.memo decorator #1331
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
base: main
Are you sure you want to change the base?
Conversation
Co-Authored-By: Alek Petuskey <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
The CI failure appears to be a flaky test unrelated to our documentation changes. Let's trigger a new CI run. |
The CI failure appears to be a flaky Playwright test unrelated to our documentation changes. This is likely due to the nextjs-portal intercepting pointer events during the test. Let's rerun the CI checks. |
Co-Authored-By: Alek Petuskey <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one of the requirements in rx.memo is typing all of the arguments, you should state that and update all of your examples to type their arguments
you should also mention that memo requires the caller to call it with kwargs and not positional arguments
…nt requirements Co-Authored-By: Alek Petuskey <[email protected]>
def increment(self): | ||
self.count += 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should add @event decorator to your events for consistency
docs/library/other/memo.md
Outdated
@rx.memo | ||
def expensive_component(label: str) -> rx.Component: | ||
return rx.vstack( | ||
rx.heading(label, size="lg"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg is not a valid arg
def increment(self): | ||
self.clicks += 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should add @event decorator to your events for consistency
docs/library/other/memo.md
Outdated
def increment(self): | ||
self.count += 1 | ||
|
||
def set_name(self, name: str): | ||
self.name = name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should add @event decorator to your events for consistency
def set_message(self, text: str): | ||
self.message = text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should add @event decorator to your events for consistency
Co-Authored-By: Alek Petuskey <[email protected]>
Documentation for rx.memo
This PR adds comprehensive documentation for the
rx.memo
decorator in the Reflex web documentation.Changes
rx.memo
with examples showing:Notes
Link to Devin run: https://app.devin.ai/sessions/e3e91c937b32476cb34b9dc0f18bd45a
Requested by: Alek Petuskey ([email protected])