Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interest in React Native Widget #103

Open
apstone opened this issue Apr 4, 2023 · 4 comments
Open

Interest in React Native Widget #103

apstone opened this issue Apr 4, 2023 · 4 comments

Comments

@apstone
Copy link

apstone commented Apr 4, 2023

Hello all - is there interest in a react native compatible widget? If so, I would like to be involved in some capacity, or take an initial stab at implementing this. If this exists, can I collaborate, if not, what would the appropriate repository be to make a PR against?

@m1guelpf
Copy link
Member

m1guelpf commented Apr 18, 2023

Hey! We'd love to support React Native, but aren't super sure of the timeline or the best way to support it right now. A good way of starting would be figuring out if our internal useAppConnection hook works in React Native, or figuring out which changes we'd need to make there if not.

const useAppConnection = (
app_id: IDKitConfig['app_id'],
action: IDKitConfig['action'],
signal?: IDKitConfig['signal'],
credential_types?: IDKitConfig['credential_types'],
action_description?: IDKitConfig['action_description'],
walletConnectProjectId?: IDKitConfig['walletConnectProjectId']
): UseAppConnectionResponse => {
const { result, verificationState, errorCode, qrData, client, createClient, reset } =
useWalletConnectStore(getStore)
const ref_credential_types = useRef(credential_types)
useEffect(() => {
if (!app_id) return
if (!client) {
void createClient(
app_id,
action,
signal,
ref_credential_types.current,
action_description,
walletConnectProjectId
)
}
}, [
app_id,
action,
signal,
walletConnectProjectId,
action_description,
client,
createClient,
verificationState,
ref_credential_types,
])
return { result, reset, verificationState, errorCode, qrData }
}

@AdamSchinzel
Copy link

AdamSchinzel commented Jun 16, 2023

To me everything in terms of libraries is okey.

Just see a few places where a window object is used which is not available on RN. It is particularly important in the QR code build process. That is kinda okey because the widget won't probably even need to build any QRCode since it can work with deep linking and redirect user directly to the mobile app if he has it. So I would say this is not change in code but in the flow a bit.

Then also the IDKitWidget component must be written using RN Elements such as View etc.

@kr-mustali
Copy link

Hey, is IDKitWidget now available for react native?

@selcukemiravci
Copy link

I'm integrating IDKitWidget into my React Native mobile app using the Universal Link for direct requests (app_id, action, etc.). How can the useAppConnection hook support these parameters for the integration?

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

No branches or pull requests

6 participants
@m1guelpf @apstone @selcukemiravci @AdamSchinzel @kr-mustali and others