Skip to content

useModelData: memoize the config object#32

Merged
jameshadfield merged 2 commits intomainfrom
memo-config
Feb 10, 2026
Merged

useModelData: memoize the config object#32
jameshadfield merged 2 commits intomainfrom
memo-config

Conversation

@joverlee521
Copy link
Copy Markdown
Contributor

Description of proposed changes

Memoize the config object to avoid cases of infinite fetches due useEffect doing a shallow comparison of the object.

Prompted by discussion on Slack

Related issue

Related to nextstrain/forecasts-flu#26

Checklist

  • Checks pass
  • Update changelog

joverlee521 and others added 2 commits February 11, 2026 11:40
Memoize the `config` object to avoid cases of infinite fetches due
`useEffect` doing a shallow comparison of the object.

Prompted by discussion on Slack
<https://bedfordlab.slack.com/archives/C03KWDET9/p1766441215142239>
from the JS file (one day we'll hopefully use TS!)
@jameshadfield jameshadfield merged commit 0af4557 into main Feb 10, 2026
@jameshadfield jameshadfield deleted the memo-config branch February 10, 2026 22:46
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.

2 participants