Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@gigscom/embeds-react-native
Advanced tools
Gigs Embeds for React Native
[!NOTE] This library is currently under development.
npm install @gigscom/embeds-react-native
When a user visits the screen in your app containing the Embed, request a Connect Session from your server endpoint. Afterward, you can render the Embed component.
Create a Gigs Connect Session on your own server.
Pass the session object from your server to your app.
Initialize the embed using the session object with an intent of type completePorting
, your project ID and an onCompleted
.
Navigate the user to the next screen once the number porting is completed.
You can also optionally pass what should happen when the component is loaded or if there is an error initializing it.
const [isLoaded, setLoaded] = useState(false)
\\ ...
{Boolean(!isLoaded) && <YourLoadingSpinner />}
<PortingEmbed
connectSession={session}
project="yourProject"
onLoaded={() => setLoaded(true)}
onError={(error) => setError(error)}
onCompleted={() => navigate('SuccessScreen')}
onSupportRequested={() => navigate('CustomerSupportScreen')}
/>
Prop | Type | Required | Description |
---|---|---|---|
connectSession | Connect Session object | ✅ | A Connect Session object with an intent of type completePorting . |
project | string | ✅ | Your project ID. |
onCompleted | function | ✅ | (porting: Porting) => unknown Callback triggered when the number porting is completed. |
onInitialized | function | ❌ | () => unknown Callback triggered when the embed is initialized. Mostly useful for debugging purposes. In most cases you want to use onLoaded to know when the component is ready. |
onLoaded | function | ❌ | () => unknown Callback triggered when the embed form is loaded with a subscription and the related porting. |
onError | function | ❌ | (error: Error) => unknown Callback triggered when there is an error initializing the porting form. The error may stem from an invalid session, in which case recovery can be attempted by generating and passing a new Connect session to the embed. Alternatively, the error may derive from a failed attempt to retrieve a subscription, in which case it is advisable to inform the user to try again later or to contact customer support for assistance. |
onSupportRequested | function | ❌ | () => unknown Callback triggered when the user has clicked the "Customer support" button. You can use it for example to open your own Customer support page. |
This project was bootstrapped with create-react-native-library.
See the contributing guide to learn how to contribute to the repository and the development workflow.
FAQs
Gigs Embeds for React Native
The npm package @gigscom/embeds-react-native receives a total of 7 weekly downloads. As such, @gigscom/embeds-react-native popularity was classified as not popular.
We found that @gigscom/embeds-react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.