New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bucketco/react-sdk

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bucketco/react-sdk - npm Package Compare versions

Comparing version

to
3.0.0-alpha.8

./dist/bucket-react-sdk.umd.js

15

dist/src/index.d.ts

@@ -40,3 +40,3 @@ import { default as React, ReactNode } from 'react';

};
type Feature<TKey extends FeatureKey> = {
export type Feature<TKey extends FeatureKey> = {
isEnabled: boolean;

@@ -154,3 +154,16 @@ isLoading: boolean;

}) => Promise<void> | undefined;
/**
* Returns the current `BucketClient` used by the `BucketProvider`.
*
* This is useful if you need to access the `BucketClient` outside of the `BucketProvider`.
*
* ```ts
* const client = useClient();
* client.on("configCheck", () => {
* console.log("configCheck hook called");
* });
* ```
*/
export declare function useClient(): BucketClient | undefined;
export {};
//# sourceMappingURL=index.d.ts.map

11

package.json
{
"name": "@bucketco/react-sdk",
"version": "3.0.0-alpha.6",
"version": "3.0.0-alpha.8",
"license": "MIT",

@@ -37,3 +37,3 @@ "repository": {

"dependencies": {
"@bucketco/browser-sdk": "3.0.0-alpha.4",
"@bucketco/browser-sdk": "3.0.0-alpha.5",
"canonical-json": "^0.0.4",

@@ -47,4 +47,4 @@ "rollup": "^4.2.0"

"devDependencies": {
"@bucketco/eslint-config": "workspace:^",
"@bucketco/tsconfig": "workspace:^",
"@bucketco/eslint-config": "^0.0.2",
"@bucketco/tsconfig": "^0.0.2",
"@testing-library/react": "^15.0.7",

@@ -70,3 +70,4 @@ "@types/jsdom": "^21.1.6",

"webpack-cli": "^5.1.4"
}
},
"gitHead": "62b55a86472f60a4a99e08a66e26c5d318aad525"
}

@@ -399,2 +399,23 @@ # Bucket React SDK

### `useClient()`
Returns the `BucketClient` used by the `BucketProvider`. The client offers more functionality that
is not directly accessible thorough the other hooks.
```tsx
import { useClient } from "@bucketco/react-sdk";
function LoggingWrapper({ children }: { children: ReactNode }) {
const client = useClient();
useEffect(() => {
client.on("enabledCheck", (evt) => {
console.log(`The feature ${evt.key} is ${evt.value} for user.`);
});
}, [client]);
return children;
}
```
## Content Security Policy (CSP)

@@ -401,0 +422,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet