Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

useEffect is not for observing variables, alternative #68

@sanjarcode

Description

@sanjarcode

Reddit conversation: https://www.reddit.com/r/reactjs/s/0h6xaFqMyQ

Will try this. Hopefully computed values also generate an event but with isTrusted false. Fine for me.

Will experiment.

This solves a lot of thinking, and bad code if it works. I'm ok with helper nodes. Props + events is the simplest system no doubt, the browser handles everything and onClickCapture and onClick provides spatial information (refs not needed).

Ignore the event bubbling part a little, some UI runtimes may not have it. But any good one will.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions