Releases: Flagsmith/flagsmith-js-client
2.0.0-beta.1
This release includes a rewrite to the build system of the SDK. It is now typescript-first and generates much better d.ts output.
This also includes a new react hooks library with easy to use nextjs support.
<FlagsmithProvider flagsmith={flagsmith}
serverState={flagsmithState as IState}
options={{
environmentID,
cacheFlags: true
}}>
<App/>
</FlagsmithProvider>
...
const flags = useFlags(["font_size"],["example_trait"]) // only causes re-render if specified flag values / traits change
...
<div className="App">
font_size: {flags.font_size?.value}
example_trait: {flags.example_trait}
</div>
1.7.4
Release 1.7.3 - Remove Bullet Train instances, small type fixes
This non-breaking change release removes mentions of Bullet Train where possible, the release contains the following PR:
#94
1.7.2
1.7.1 - Added Identity type
This release adds the identity typescript type to flagsmith
/**
* The stored identity of the user
*/
identity?:string
1.7.0 - resolve init promise for previously identified users
Prior to this release, if you identify a user before calling init then the promise would not resolve.
1.6.10 - trigger onChange with defaultFlags
Previously, if defaultFlags were set but preventFetch was true, flagsmith would never call onChange. As of this release onChange will callback with the defaultFlags.
1.6.7
1.6.6
1.6.2 - update types
This release resolves #81, previously types indicated that getFlags,identify,setTrait and other calls would resolve with IFlags however this is not the case. These calls should be followed by getValue / hasFeature.