Skip to content

Commit 376e011

Browse files
fix(deps): update dependency @growthbook/growthbook-react to v1 (#1986)
* fix(deps): update dependency @growthbook/growthbook-react to v1 * fix(eslint): default value is define --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alexandre Philibeaux <[email protected]>
1 parent b2b7755 commit 376e011

File tree

4 files changed

+19
-21
lines changed

4 files changed

+19
-21
lines changed

packages/use-growthbook/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"feature flags"
4141
],
4242
"dependencies": {
43-
"@growthbook/growthbook-react": "0.26.0"
43+
"@growthbook/growthbook-react": "1.0.0"
4444
},
4545
"devDependencies": {
4646
"react": "18.3.1"

packages/use-growthbook/src/useAbTestAttributes.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@ export const useAbTestAttributes = (): [
77
] => {
88
const growthBook = useGrowthBook()
99

10-
if (growthBook) {
11-
const attributes = growthBook.getAttributes()
10+
const attributes = growthBook.getAttributes()
1211

13-
const setAttributes = (newAttributes: Attributes) =>
14-
growthBook.setAttributes({
15-
...attributes,
16-
...newAttributes,
17-
})
12+
const setAttributes = (newAttributes: Attributes) =>
13+
growthBook.setAttributes({
14+
...attributes,
15+
...newAttributes,
16+
})
1817

19-
return [attributes, setAttributes]
20-
}
21-
22-
return [{}, () => {}]
18+
return [attributes, setAttributes]
2319
}

packages/use-random-name/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
"sideEffects": false,
99
"type": "module",
1010
"module": "./dist/index.js",
11+
"main": "./dist/index.cjs",
1112
"types": "./dist/index.d.ts",
1213
"exports": {
1314
".": {
1415
"types": "./dist/index.d.ts",
16+
"require": "./dist/index.cjs",
1517
"default": "./dist/index.js"
1618
}
1719
},

pnpm-lock.yaml

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)