Skip to content

fix: superposition config race condition - #84

Open
Shivam25092001 wants to merge 1 commit into
v1.9.0-patchfrom
v1.9.1-patch
Open

fix: superposition config race condition#84
Shivam25092001 wants to merge 1 commit into
v1.9.0-patchfrom
v1.9.1-patch

Conversation

@Shivam25092001

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Documentation
  • CI/CD

Description

Refer: juspay/hyperswitch-client-core#552

How did you test it?

Impact on Mobile and Web Repositories

Outline steps taken to ensure compatibility with consuming repositories:

  • I tested the submodule changes in the mobile repository.
  • I tested the submodule changes in the web repository.
  • I updated the corresponding documentation in both repositories, if applicable.
  • I confirmed the changes do not introduce regressions in either repository.

Checklist

  • I reviewed submitted code thoroughly.
  • I ensured the changes are compatible with both mobile and web repositories.
  • I communicated potential breaking changes, if any, to the relevant teams.

@@ -11,6 +11,8 @@ external cacReader: JSON.t => Nullable.t<configurationService> = "CacReader"
let service = ref(None)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use the useRef instead of the ref in the useConfigurationService?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is anyways changed in the latest of 'main' so didn't add much changing it here.

Do you see any other benefits here for useRef, rather than tying this variable to react ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the value doesn't need to trigger re-renders and isn't component-specific, the current approach seems reasonable.

@manideepk90 manideepk90 Aug 7, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't need to scope it to the component, I think the current approach is fine.

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