Skip to content

2.0.5 - Minor fixes and React Improvements

Choose a tag to compare

@kyle-ssg kyle-ssg released this 23 Mar 11:25
· 478 commits to main since this release

This release includes a few underlying type fixes as well as a solution to #105

You can now supply identity / trait options to flagsmith.init.

flagsmith.init({... identity:"my_user", traits: {age:21}})

Also if you're using the react hooks / provider, you can now initialise flagsmith outside of the component. To do so you will call flagsmith.init and not pass options to your FlagsmithProvider e.g.

flagsmith.init({
    environmentID: "QjgYur4LQTwe5HpvbvhpzK",
    cacheFlags:true,
    identity: "my_user",
    traits: {{trait1:"value}}
})
...
  <FlagsmithProvider flagsmith={flagsmith}>
    <App />
  </FlagsmithProvider>