12.0.0 (2026-03-06)
- migrate npm packages to @flagsmith organization scope (#367)
- re-add sdk version headers (#344)
- onError not called if cacheFlags is true and api is not reachable (#365)
- migrate npm packages to @flagsmith organization scope (#367) (d0ecefb)
- re-add sdk version headers (#344) (47b610f)
- angularHttpClient fetch error (#359) (44e4b79)
- catch init error in useFlagsmith (#351) (5380dc3)
- export FlagSource enum as runtime value (#349) (d480bb9)
- onError not called if cacheFlags is true and api is not reachable (#365) (1411b85)
- removed-react-native-publishing (#381) (a0894b9)
- revert User-Agent header again (#362) (53baaa9)
- types: loading state source unresolved any (#360) (30c35a3)
- add release please (#353) (353dbf7)
- fix trusted publishing (#355) (881c648)
- publish-internal-version-action-workflow (#378) (02b1892)
- deps-dev: bump form-data from 4.0.0 to 4.0.4 (#331) (187feda)
- deps: bump js-yaml from 3.14.1 to 3.14.2 (#361) (e15a0dc)
- main: release 10.0.0 (#364) (9187900)
- main: release 9.3.3 (#354) (2832793)
- main: release 9.3.4 (#356) (9ef8c37)
- main: release 9.3.5 (#363) (563e590)
10.0.0 (2025-12-10)
- re-add sdk version headers (#344)
- onError not called if cacheFlags is true and api is not reachable (#365)
9.3.5 (2025-12-08)
9.3.4 (2025-11-18)
- angularHttpClient fetch error (#359) (44e4b79)
- catch init error in useFlagsmith (#351) (5380dc3)
- types: loading state source unresolved any (#360) (30c35a3)
9.3.3 (2025-11-05)
9.3.2 (9.3.2-post0) - 2025-09-03
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/9.3.1...9.3.2
9.3.1 - 2025-08-19
- fix: typescript type generation when array of fields is passed. by @rushib1 in #325
- feat: send flagsmith sdk user agent by @Zaimwa9 in #332
- fix: renamed-sentry-client-interface by @Zaimwa9 in #335
- fix: make-id-optional-in-iflags by @Zaimwa9 in #336
- chore: bumped-react-native-version by @Zaimwa9 in #337
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/9.3.0...9.3.1
9.3.0 - 2025-07-01
Adds the Sentry integration
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/9.2.2...9.3.0
9.2.2 - 2025-05-13
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/9.2.1...9.2.2
9.2.1 - 2025-05-05
- fix: updated-interface-flags-for-javascript-client by @Zaimwa9 in #315
- fix: improved-on-change-and-fvalue-types by @Zaimwa9 in #316
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/9.2.0...9.2.1
9.2.0 - 2025-04-28
- feat: send client info to Flagsmith by @tiagoapolo in #293
- Fix: typo in type definition file by @benwilson34 in #308
- fix: added-key-of-generic-record-and-tests by @Zaimwa9 in #311
- chore: bump-version by @Zaimwa9 in #312
- @benwilson34 made their first contribution in #308
- @Zaimwa9 made their first contribution in #311
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/9.1.0...9.2.0
9.1.0 - 2025-04-08
Allows specifying a type definition for all feature flags #298, a pre-requisite for Flagsmith/flagsmith-cli#24
9.0.5 - 2025-03-13
- fix: conflicting ts field type by @tiagoapolo in #294
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/9.0.4...9.0.5
9.0.4 - 2025-02-12
fixes #289
- fix: Generates isomorphic types by @tiagoapolo in #291
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/9.0.3...9.0.4
9.0.3 - 2025-01-23
Closes #287
9.0.2 - 2025-01-22
Closes #283
9.0.1 - 2025-01-20
- fix: Don't use cached traits to initialize sdk state by @tiagoapolo in #282
- fix: Types not being exported and autocomplete not working by @tiagoapolo in #284
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/9.0.0...9.0.1
9.0.0 - 2025-01-15
This release removes flagsmith-es and makes the flagsmith npm package both umd and es module compatible. Closes #226
8.0.3 - 2025-01-15
- chore: typecheck on build by @kyle-ssg in #267
- fix: Unhandled exception when getting value from local storage by @tiagoapolo in #279
- chore: Deprecate flagsmith-es by @kyle-ssg in #281
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/8.0.2...8.0.3
8.0.2 - 2025-01-02
- fix: Un-deprecate
setTrait,setTraitsandidentifyby @tiagoapolo in #276
- @tiagoapolo made their first contribution in #276
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/8.0.1...8.0.2
8.0.1 - 2024-12-18
Fixes sourcemaps (#239) Fixes ReactNode type (#268) Fixes identifier being removed from context in getFlagsResponse (#262)
8.0.0 - 2024-12-18
- fix: Handle uncaught fetch exception by @frankieyan in #256
- Release 8.0.0 by @matthewelwell in #274
This release reintroduces the changes originally added in Version 6.0.0. This changes the key used by the flagsmith client for internal storage to allow support for multiple environments. See #252 for further details.
- @frankieyan made their first contribution in #256
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/7.0.2...8.0.0
Version 7.0.2 - 2024-11-05
- fix: Incorrect argument type, interface extension by @khvn26 in #261
- fix: Interface extensions are not correct by @khvn26 in #266
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/7.0.1...7.0.2
Version 7.0.1 - 2024-10-17
Allows flagsmith.setContext({...}) prior to init.
7.0.0 - 2024-10-10
This is a temporary release that reverts the changes in 6.0.0.
- Bump rollup from 2.78.0 to 2.79.2 by @dependabot in #255
- Revert "feat: support multiple environment caching" by @rolodato in #258
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/6.0.0...7.0.0
Closes #201. The local storage keys for the SDK cache are now unique for each environment. This is being released as a breaking change because, upon upgrading to this version, the cache will be missed the first time due to the previous key ('BULLET_TRAIN_DB') being ignored
Thank you very much for the great PR @oluizcarvalho 🚀
This release supports the concept of transient traits, setting this will mean the trait is not stored within Flagsmith and evaluated just in that request.
You can define a trait as transient like so:
setTraits({bar:{value:123, transient: true}})
setTraits({foo:"1", bar:{value:123, transient: true}})
flagsmith.init({
traits: {foo:"1", bar:{value:123, transient: true}}
})This release also deprecates the above calls in favour of setting context. Context allows you to set information as a single object which we may extend in future more easily. We suggest migrating to this soon.
You can set a partial context and it will merge with the one provided during SDK init.
Currently, the full context object looks like this:
flagsmith.setContext({
{
environment: {apiKey: "<your environment API key>"},
identifier: "unique-user-id",
traits: {foo:"1", bar:{value:123, transient: true}},
transient: false
}
})Version 4.1.4 - 2024-09-24
Closes #253
Version 4.1.3 - 2024-09-17
Closes #250 - thank you @blackjid 🚀
Version 4.1.2 - 2024-09-11
Closes #238
Fixes a race condition whereby flag state returns as {} if flagsmith.init resolves after flagsmith.identify
Version 4.1.1 - 2024-09-10
Solves #242. When calling flagsmith.init with traits they will now be merged with any cached traits.
Version 4.1.0 - 2024-09-04
Resolves #243
Adds a fallback for a feature flag when the flag doesn't exists.
flagsmith.hasFeature("deleted_feature",{fallback:true})
Version 4.0.3 - 2024-07-03
Closes #235
Version 4.0.2 - 2024-05-17
Full Changelog: https://github.com/Flagsmith/flagsmith-js-client/compare/4.0.1...4.0.2
v4.0.1 Fix onChange Generic Types - 2024-04-24
Closes #224
This will be the first version compatible with OpenFeature. Merges #223
Breaking changes
- Init will now reject if:
- No environment ID is provider
- Fetch fails and there's no cache (Init resolves on cache)
- There's no cache/defaults and preventFetch is true
- The boolean properties traitsChange and flagsChanged are now a string[] of changed keys or null. This reduces breaking changes since falsey and truthy checks will still behave as before.
Other changes
- Init is (finally) async/await
- Init code is reduced by pulling out isolated functions
- Added tests around init promises
- Organised util files
3.24.0 - Read cache synchronously - 2024-03-28
Closes #222
The SDK will now synchronously read cache rather than fetching it asynchronously.
3.23.2 - Remove busy logs, fix onChange event - 2024-03-01
3.23.1 - Prevent Nextjs caching behaviour - 2024-03-01
Merges #216
3.23.0 - Fix missed events in useFlags - 2024-02-29
Closes #214
- Fixes flag updates from useFlags
- Fixes flag updates where flagsmith.init is not called
3.22.1 - Support fallback for non-JSON evaluations - 2024-02-20
Merges #213, thanks to @levrik
Prior to this release, clients that request identified/unidentified flags simultaneously could see the wrong results due to a race condition. Although this signifies incorrect usage of the SDK, this will no longer occur.
For more information see #205.
3.19.0 - Access Flagsmith loading state - 2023-06-23
This introduces a strategy to responding to loading state changes in flagsmith
The following will be exposed to Flagsmith:
export declare enum FlagSource {
"NONE" = "NONE",
"DEFAULT_FLAGS" = "DEFAULT_FLAGS",
"CACHE" = "CACHE",
"SERVER" = "SERVER",
}
export declare type LoadingState = {
error: Error | null, // Current error, resets on next attempt to fetch flags
isFetching: bool, // Whether there is a current request to fetch server flags
isLoading: bool, // Whether any flag data exists
source: FlagSource //Indicates freshness of flags
}
It can be consumed via the onChange function of flagsmith.init or the newly introduced useFlagsmithLoading
onChange?: (previousFlags: IFlags<F> | null, params: IRetrieveInfo, loadingState:LoadingState) => void;
const loadingState:LoadingState = useFlagsmithLoading()3.18.4 - Audit fix - 2023-06-20
This version includes an npm audit fix.
3.18.3 - Ignore undefined traits - 2023-04-05
Closes #167
3.18.2 - Adds Datadog RUM - 2023-03-20
This release adds an integration to Datadog RUM, it focuses on the new experimental feature_flags feature, you can read more about it here https://docs.datadoghq.com/real_user_monitoring/guide/setup-feature-flag-data-collection/?tab=npm.
This will track remote config and feature enabled states as feature flags in the following format
flagsmith_value_<FEATURE_NAME> // remote config
flagsmith_enabled_<FEATURE_NAME> // enabled state
Additionally, the integration will also store Flagsmith traits against the Datadog user in the following format:
flagsmith_trait_<FEATURE_NAME> // remote config
You can find an example of this integration here.
3.18.1 - Realtime features - 2023-03-20
This release adds a stable implementation of realtime features and is used on app.flagsmith.com.
Flagsmith projects that are opted into realtime are able to enable realtime within flagsmith.init as {realtime: true}, this will instruct the SDK to connect to our realtime SSE endpoint to receive feature updates from the environment and segment overrides.
3.16.0 - Always send an Error object to onError - 2023-01-30
Closes #93. This aims to make the type of onError more predictable by always sending it as an Error object. Thank you to @gfrancischini for the sensible suggestion!
3.15.1 - Fix Promise return from setTrait(s) - 2022-12-19
Prior to this release, setTrait(s) calls were not returning a promise, they will now resolve when the API returns a new set of flags.
- Calls to setTrait/setTraits now only hit 1 endpoint, previously they hit 2.
- The behaviour of setTrait now matches setTraits, prior to this you could not delete a trait via
flagsmith.setTrait("trait",null). Also, this prevents an issue where segment flags were sometimes not returned in response to setting a trait.
Prior to this release, there were cases where flags provided by serverState are cleared, potentially effecting the isomorphic client (e.g. Next.js applications). This is because <ReactProvider/> initialises Flagsmith internally after server state is set.
This change makes sure that Flagsmith is initialises with the server state so that the state is preserved.
3.14.0 - Reduce bundle size - 2022-11-09
This release reduces the bundle size (31kb -> 21kb Pre GZIP) of the core SDK, it does so by patching one of our only dependencies (@callstack/async-storage) to export just the functions we need and remove the dependency of lodash.
3.13.1 - fix IFlagsmithFeature type - 2022-11-09
Closes #153
3.13.0 - Fix race condition with useFlags - 2022-10-27
Prior to this release, there were cases where useFlags was not updating flags when the Flagsmith cache was received. This was down to event listeners not being initialised prior to the cache being accessed.
3.12.0 - fix fallback usage on null flags - 2022-10-27
A few releases ago we added the ability to automatically parse JSON in flagsmith.getValue. Since null is parseable by JSON.parse, the fallback was not being used in a lot of cases. Now, the client will ignore null flag values and use the fallback.
const json = flagsmith.getValue<{foo: string|null, bar: string|null}>("json_value", {
json: true,
fallback: {foo:null,bar:null}
});
// if the value is null, json before this release would be null
3.11.0 - Fix offline cache usage - 2022-10-20
Closes #148, prior to this release failed API requests (e.g. offline) would incorrectly update the local storage cache. Failed API calls will correctly trigger onError with the appropriate information.
This also fixes a usecase where the client has analytics data for an environment different to the one they are currently requesting https://github.com/Flagsmith/flagsmith-js-client/blob/main/flagsmith-core.ts#L201.
Thank you so much to @gfrancischini for spotting and reporting this.
3.10.5 - getValue JSON type support - 2022-10-09
This release will allow you to specify the return type of getValue as well as allow you to parse the value as JSON.
// for getting JSON values this will type the return
const json = flagsmith.getValue<{ foo: string | null; bar: string | null }>('json_value', {
json: true,
fallback: { foo: null, bar: null },
});
console.log(json.foo); // typed as {foo: string|null, bar: string|null}
// If a type is not specified for getValue it will asume it from the type of fallback. In this case, a number.
const font_size = flagsmith.getValue('font_size', { fallback: 12 });Thank you very much @azriel46d and @dangrima90 🤩
Prior to this release, users on React Native had to install both the react-native SDK and standard flagsmith SDK.
An implementation would look like this
import flagsmith from 'react-native-flagsmith';
import {FlagsmithProvider} from 'flagsmith/react';
<FlagsmithProvider flagsmith={flagsmith}
...With this release you can now import react specific components from 'react-native-flagsmith'. So implementation can be as follows
import flagsmith from 'react-native-flagsmith';
import {FlagsmithProvider} from 'react-native-flagsmith/react';3.10.1 - Fix multi project flag analytics - 2022-09-22
Closes #145
3.10.0 Realtime flag preparations - 2022-09-22
This release configures serverside event urls to match what we intend to use for production. More updates on realtime flags will follow.
3.9.0 Fixed source maps - 2022-08-22
This release fixes source mapping for all clients, prior to this you could not inspect ts functions such as init and getFlags from flagsmith-core.ts.
3.8.1 - Preparations for realtime flags - 2022-08-17
This release includes working functionality for Serverside Events in the Flagsmith JavaScript client, React Native and SSR clients. A follow-up release will be published when this is released to production.
Prior to this release, React Native was not receiving flag updates with useFlags(["flag_name"]), this is due to the event emitter not being compatible.
This release also prepares functionality for realtime flags.
3.7.2 - Inform user of undefined fetch - 2022-08-10
Similarly to version 3.7.1, this change caters for SSR technologies not supporting fetch. This version informs the user when fetch is undefined regardless of whether the user is opted into logging.
3.7.1 - Add fetch logging - 2022-08-10
With SSR clients especially where fetch implementations differ, it's important to be able to debug fetch requests. With this version you will be able to see fetch statuses and exceptions when you pass enableLogs:true within flagsmith.init
Given that we type our flags and traits
type FlagOptions = "font_size" | "hero"
type TraitOptions = "example_trait"
We can now enforce these types:
// enforces you passing the correct key to flagsmith.getValue(x), flagsmith.getTrait(x)
import flagsmith from "flagsmith"
const typedFlagsmith = flagsmith as IFlagsmith<FlagOptions,TraitOptions>
// Similarly for the useFlagsmith hook
const flagsmith = useFlagsmith<FlagOptions, TraitOptions>(); // enforces flagsmith.getValue()
// for useFlags this will ensure you only can pass correct keys also
const flags = useFlags<FlagOptions, TraitOptions>(["font_size"],["example_trait"]);
Thank you very much for this addition @PrettyWood
Closes #132 Thank you to @dgreene1 for the in-depth review 🚀 .
3.5.0 - allow custom fetch implementations - 2022-08-05
Some SSR technologies e.g. Nuxt do not provide a fetch polyfill, this means that sometimes we need to tell Flagsmith how to fetch data.
This is now possible with the following:
flagsmith.init({fetch:myCustomImplementation})
Here's an example of how this can be done with Nuxt https://github.com/Flagsmith/flagsmith-js-client/blob/main/examples/nuxt/plugins/flagsmith-plugin.ts#L10
3.4.0 - Remove deprecated IBulletTrainFeature type - 2022-07-15
IBulletTrainFeature had been deprecated many releases ago, this release removes it entirely. If your application imports it, just import IFlagsmithFeature instead. See https://github.com/Flagsmith/flagsmith-js-client/blob/main/types.d.ts
3.3.2 - Added Next.js Middleware Support - 2022-07-01
This release adds a Next.js middleware compatible bundle, a working example of this can be found here.
Closes #112
3.3.0 - Added cacheOptions - 2022-06-29
When calling flagsmith.init you can now pass cacheOptions
{
ttl?:number, // how long to persist the cache in ms (defaults to 0 which is infinite)
/*
If this is true and there's cache available, it will skip hitting the API as if preventFetch was true
Note: this is just for flagsmith.init(), Calls to identify, getFlags etc will still hit the API regardless
*/
skipAPI?:boolean
}
Thanks to @qrush for the suggestion 🚀
3.2.0 fix initialisation - 2022-06-24
Prior to this release, flagsmith would initialise inside a useEffect within the FlagsmithProvider component, now it will initialise immediately as can be seen here. Initialising flagsmith asynchronously meant that the UI could flicker when default values are supplied, as well as being overall slower than it needs to be.
Thanks to @briangorham for spotting this 🚀 .
3.1.2 - Adjust Dynatrace integration syntax - 2022-06-13
In order to make the Dynatrace integration more simplistic, this replaces the dtrum init property with "enableDynatrace"
When providing dtrum instance to flagsmith.init, flagsmith will send session properties corresponding to flag enabled state, flag values and user traits. See here for an example.
-
flag enabled state sends as a shortString as "true" or "false" with the prefix flagsmith_enabled_ example:
flagsmith_enabled_hero: "true" -
Remote config values sends as value with the prefix flagsmith_value_, this value will be a javaDouble for numeric values and a shortString for any other. example:
flagsmith_value_font_size: 21,flagsmith_value_hero_colour: "blue" -
Remote config values sends as value with the prefix flagsmith_value_, this value will be a javaDouble for numeric values and a shortString for any other. example:
flagsmith_trait_age: 21,flagsmith_trait_favourite_colour: "blue"
View the docs here!
3.1.0 - fix setTrait(s) prior to identify - 2022-06-13
Prior to this release, there were instances where calling setTrait or setTraits prior to identifying would attempt to hit the API. With this change, setTrait(s) will always build up an object of intended traits that will get sent as soon as the user is identified.
3.0.6 - fix flagsmith.setTraits - 2022-06-11
After migrating to the v2 SDK, the traits/bulk endpoint was deprecated, this release replaces that endpoint.
3.0.4: Remove increment / decrement functions - 2022-06-08
Merges: #120 @matthewelwell 🥳
The Edge API will no longer allow for flagsmith. incrementTrait, this PR removes it from the SDK as well as examples.
3.0.3 - 2022-06-08
Merges:
#116 Thank you @eschaefer 🥳
f0a62587d0 Thank you @markatom 🥳
3.0.0 - 2022-06-07
Edge API as default!
2.0.9 Fix error with incrementTrait - 2022-03-25
Closes #109, thanks @TD-4242 🚀
2.0.8 ESM module support - 2022-03-23
With this release, users are now able to npm install from flagsmith-es, this is a mirrored npm module except it is bundled as an ES module.
Thanks @bradberger for the suggestion 🚀
Closes #103 thanks to @xrash 🥳 #104
2.0.5 - Minor fixes and React Improvements - 2022-03-23
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>
2.0.0 - react hook support for React+React Native - 2022-03-22
React and React Native users will now be able to use a hook based approach to retrieving flags
import React from 'react';
import flagsmith from 'flagsmith' // 'react-native-flagsmith'; for react-native
import {FlagsmithProvider} from 'flagsmith/react';
import AppComponent from './ExampleComponent';
export default function () {
return (
<FlagsmithProvider
options={{
environmentID: 'QjgYur4LQTwe5HpvbvhpzK',
}}
flagsmith={flagsmith}>
<AppComponent />
</FlagsmithProvider>
);
}
Then in your app
const flags = useFlags(['font_size'], ['example_trait']); // only causes re-render if specified flag values / traits change
...
<div>font_size: {flags.font_size?.value}</div>
2.0.0-beta.2 - 2022-03-15
Fixes passing undefined to traits in useFlags, thanks @NileDaley 🚀 #102
2.0.0-beta.1 - 2022-03-07
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 - 2022-02-20
This non-breaking change release removes mentions of Bullet Train where possible, the release contains the following PR: #94
1.7.2 - 2021-12-16
Merged: #90
1.7.1 - Added Identity type - 2021-12-06
This release adds the identity typescript type to flagsmith
/**
* The stored identity of the user
*/
identity?:string
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 - 2021-10-11
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 - 2021-09-22
Fixes #84
1.6.6 - 2021-09-15
This release fixes an issue where flagsmith.init was not resolving if no flags previously existed in cache.
1.6.2 - update types - 2021-07-26
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.
1.6.1 - Fix react native types - 2021-07-26
This release fixes an issue with react native types #82
1.6.0 - Use api.flagsmith.com - 2021-07-06
Prior to this release, API calls from the JS SDK went to https://api.bullet-train.io, now they go to https://api.flagsmith.com
1.5.0 Multiple flagsmith instances - 2021-06-15
This release allows you to create multiple instances of flagsmith, this may be used when you wish to identify multiple users simultaneously within your app and retain access to getValue, hasFeature etc for each user.
Type:
export function createFlagsmithInstance (): IFlagsmith<br class="Apple-interchange-newline">
Usage:
import { createFlagsmithInstance } from "flagsmith";
const flagsmith = createFlagsmithInstance();
const flagsmithB = createFlagsmithInstance();
// now you can use flagsmith as before but in its own instance
Added traits parameter to identify (1.4.1) - 2021-05-20
As of this release you can now supply traits with the identify call, this combines setTraits and identify into 1 call.
/**
* Identify user, triggers a call to get flags if flagsmith.init has been called
*/
identify:(userId:string, traits?: Record<string, string|number|boolean>,) => Promise<IFlags|undefined>
