Enforce that `reactive.event` is used with a `reactive.Calc` or render method

Open
#691 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start by reproducing the linked reprex and tracing how reactive.event reads a reactive value outside a reactive.Calc or render method. Inspect the reactive.event, reactive.Calc, and render entry points mentioned in the issue. Done means the supported usage is enforced and the existing-value behavior is covered by a regression test.

Written by the indexing model from the issue text.

Description

bug

When reading a reactive value that has been decorated by a reactive.event, if the value is read again at a later date, the original reactive is recalculated.

I would expect the existing value to be recycled.

Reprex app

Screenshot 2023-08-21 at 12 11 28 PM

Dominant language
Python
Stars
1.8k
Forks
135
Avg merge
2d 18h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/py-shiny

All issues in posit-dev/py-shiny

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.