Skip to content

fix(explorer): avoid holdings state updates during render#805

Open
umeeSthein wants to merge 1 commit intotempoxyz:mainfrom
umeeSthein:fix/explorer-holdings-render-state
Open

fix(explorer): avoid holdings state updates during render#805
umeeSthein wants to merge 1 commit intotempoxyz:mainfrom
umeeSthein:fix/explorer-holdings-render-state

Conversation

@umeeSthein
Copy link
Copy Markdown

### motivation

The holdings view in the address route was mutating local state during render.

It reset holdings pagination and the show-all toggle when the address changed, and it also clamped the current holdings page during render when the visible asset count shrank. That makes the route fragile and can cause unnecessary rerenders or pagination flicker when holdings data changes asynchronously.

### implications

- move holdings reset-on-address-change into React.useEffect

- move holdings page clamping into React.useEffect

- render address transitions with the default holdings UI state immediately

- reuse the normalized holdings page count for both row slicing and the holdings footer

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant