![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@bucketco/react-sdk
Advanced tools
React client side library for [Bucket.co](https://bucket.co)
React client side library for Bucket.co
Install via npm:
npm i @bucketco/react-sdk
Wrap your application with the Bucket
higher order component.
This will initialize Bucket, fetch feature flags and start listening for Live Satisfaction events.
<Bucket
publishableKey="{YOUR_PUBLISHABLE_KEY}"
context={{
// The context should take the form of { user: { id }, company: { id } }
// plus anything additional you want to be able to evaluate flags against.
user: { id: "john_doe" },
company: { id: "acme_inc" },
}}
>
{/* ... */}
</Bucket>
All options which can be passed to bucket.init
can be passed as props to the Bucket higher order component.
See the Tracking SDK documentation for more.
<Bucket
publishableKey="{YOUR_PUBLISHABLE_KEY}" // The publishable key of your app environment
debug={false} // Enable debug mode to log info and errors
persistUser={true} // See the Tracking SDK documentation under "Persisting Users"
host="https://tracking.bucket.co" // Configure the host Bucket calls are made to
sseHost="https://livemessaging.bucket.co" // Configure the host Bucket SSE calls are made to
feedback={{
// See feedback options here: https://github.com/bucketco/bucket-tracking-sdk/blob/main/packages/tracking-sdk/FEEDBACK.md#global-feedback-configuration
}}
>
useBucket()
Returns the instance of the Bucket Tracking SDK in use. This can be used to make calls to Bucket, including track
and feedback
calls, e.g.
const bucket = useBucket();
bucket.track("sent_message", { foo: "bar" }, "john_doe", "company_id");
See the Tracking SDK documentation for usage information.
useFeatureFlag()
Returns the state of a given feature flag for the current context, e.g.
const joinHuddleFlag = useFeatureFlag("join-huddle");
// {
// "isLoading": false,
// "value": true,
// }
useFeatureFlags()
Returns feature flags as an object, e.g.
const featureFlags = useFeatureFlags();
// {
// "isLoading": false,
// "flags: {
// "join-huddle": {
// "key": "join-huddle",
// "value": true
// },
// "post-message": {
// "key": "post-message",
// "value": true
// }
// }
// }
MIT License
Copyright (c) 2024 Bucket ApS
FAQs
React client side library for [Bucket.co](https://bucket.co)
We found that @bucketco/react-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.