Skip to content

Releases: Flagsmith/flagsmith-js-client

2.0.9 Fix error with incrementTrait

25 Mar 15:24
138c4ae

Choose a tag to compare

2.0.8 ESM module support

23 Mar 16:54
b894e8f

Choose a tag to compare

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 🚀

2.0.6: Closes https://github.com/Flagsmith/flagsmith-js-client/issues/103

23 Mar 13:06
5ea5920

Choose a tag to compare

2.0.5 - Minor fixes and React Improvements

23 Mar 11:25

Choose a tag to compare

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

22 Mar 11:23

Choose a tag to compare

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

15 Mar 13:42

Choose a tag to compare

Fixes passing undefined to traits in useFlags, thanks @NileDaley 🚀 #102

2.0.0-beta.1

07 Mar 13:07
3c84d94

Choose a tag to compare

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

20 Feb 09:10

Choose a tag to compare

Closes #99
Closes #98

Thank you @gf3 and @xrash 🚀

Release 1.7.3 - Remove Bullet Train instances, small type fixes

18 Jan 18:17
167b883

Choose a tag to compare

This non-breaking change release removes mentions of Bullet Train where possible, the release contains the following PR:
#94

1.7.2

16 Dec 09:16

Choose a tag to compare

Merged:
#90