Skip to content

Conversation

@EDSONZ-WASSWA
Copy link

…allbacks

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work is based on designs, which are linked or shown either in the Jira ticket or the description below.
  • My work includes tests or is validated by existing tests.

Summary

_ I changed the storage of visit form callbacks from useState to useRef_ as the ticket said it.
Followed the conversation on this pull-request

Screenshots

Related Issue

Other

ticket

@chibongho look at this pull request

@chibongho
Copy link
Contributor

Thanks @EDSONZ-WASSWA . Looks like a test case is failing to build with this change, can you fix it?

Can you also mention what did you to test this? The main thing would be to verify that the callbacks are properly registered and called.

@EDSONZ-WASSWA EDSONZ-WASSWA force-pushed the O3-4274-visit-form-use-use-ref-instead-of-use-state-for-use-visit-form-callbacks branch from c9bed81 to 03cabd9 Compare October 27, 2025 20:16
@EDSONZ-WASSWA
Copy link
Author

Thanks @EDSONZ-WASSWA . Looks like a test case is failing to build with this change, can you fix it?

Can you also mention what did you to test this? The main thing would be to verify that the callbacks are properly registered and called.

failing tests were caused by mocks still using the old shape.
i tried to mock useVisitFormCallbacks to return a ref-shaped object { current: Map(...) }. as the solution

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