cuddly-shampoo-71997
04/16/2025, 8:24 AM@growthbook/growthbook-react
here in docs https://docs.growthbook.io/lib/react#updating-attributes
gb.setAttributes({
// Only update the `url` attribute, keep the rest the same
...gb.getAttributes(),
url: "/new-page"
})
but I found that there is a method:
gb.updateAttributes()
it spreads previous attributes under the hood.
But it doesn't cover in docs. So probably it can be removed in next versions of SDK.
What will your recommendation?strong-mouse-55694
04/16/2025, 12:57 PMupdateAttributes
as it makes it clearer what's happening. I'll also update the docs to reflect this method.cuddly-shampoo-71997
04/16/2025, 2:18 PM