Skip to content

perf: inline handlers defeat memoisation across the app #456

Description

@nanaf6203-bit

Summary

Many components define inline handlers that reallocate each render (e.g. PropertyCard's handleAddToCart, etc.) — defeating child memoization.

Affected area

  • src/components/PropertyCard.tsx
  • src/components/MultiChainPortfolio.tsx
  • src/components/WalletConnectedView.tsx

Steps to reproduce

In React DevTools, observe the "Why did this render?" hint.

Expected behaviour

Wrap handlers with useCallback, lift state, or use stable IDs to scope child memoization.

Acceptance criteria

  • Profiler shows reduced child renders.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programperformancePerformance / bundle / runtimepriority/p3P3 — nice to have

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions