Make computedFn Warnings Optional?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
Getting tons of the warning "invoking a computedFn from outside an reactive context won't be memoized, unless keepAlive is set" due to calling methods that use computedFns inside tests.
Ex: Test calls something like:
` handleSelection = (id) => {
this.isSelected(id) ? this.deselect(id) : this.select(id);
};`
to set up test case. And because isSelected is a computedFn, there's a warning for each time it's invoked. I see how these warnings are useful, but would it be possible to make them optional for cases like this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the computedFn implementation and the warning text, then inspect existing tests that invoke computedFns outside a reactive context. Determine how an optional warning setting should be exposed and verify that the default warning behavior remains unchanged while callers can suppress it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100