Skip to content

Feature: linkPoints 업데이트 타이밍 관련 비동기 처리 문제 #153

@sg-hwang-333

Description

@sg-hwang-333

Describe the problem

linkPoints가 업데이트된 직후 해당 값을 참조해야 하는 로직이 있습니다.
하지만 실제로는 UI 업데이트 또는 internal state sync가 한 틱 늦게 반영되어, 정확한 값을 얻기 위해 아래와 같이 setTimeout을 강제로 사용해야 하는 상황입니다.

// linkPoints가 한 틱 밀려서 setTimeout으로 강제 sync
await new Promise((r) => setTimeout(r, 10));

// 이후 linkPoints 사용

Describe the proposed solution

업데이트 API 호출 이후, 내부 상태가 완전히 반영된 시점에 로직을 이어갈 수 있도록
Promise 기반의 update 완료 신호 혹은 update callback hook이 제공되면 좋겠습니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    💡 Feature RequestCommunity request for new features, APIs, packages.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions