Skip to content

Refactor: remove redundant useEffects and derived state across core views #766

@plebe1us

Description

@plebe1us

https://react.dev/learn/you-might-not-need-an-effect

Refactor Header, AccountBar, PostPage, Subplebbit, and SubmitPage to derive values during render instead of syncing them with effects. Remove effect-driven state, keeping effects only for real side‑effects; add memoization where it meaningfully reduces work. Maintain current behavior while reducing re-renders and simplifying components.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions