Skip to content

optimize useNetworkConfig /api/config fetch calls #474

@SgtPooki

Description

@SgtPooki

useNetworkConfig always performs a fresh fetch on mount. On the landing page you now render both NetworkSwitcher (in the header) and NetworkBadge, so this will trigger duplicate /api/config requests on initial load. Consider introducing a shared cache (module-level promise/result, a context/provider, or a data-fetching library) so multiple consumers reuse the same request/result.

Originally posted by @Copilot in #472 (comment)


we should make sure we aren't unnecessarily pinging /api/config.. confirm backend has cached response (it should be the same per startup) or that we optimize calls on the front-end. no need to make unnecessary network calls if we can help it easily

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededready-for-workTriaged: scope, plan, and DoD are clear; contributor can pick up

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    🐱 Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions