Welcome to the Flagship ReactJS SDK documentation!

The following documentation helps you to run Flagship on your ReactJS environment (client-side or server-side).

Wants to have a look at the GitHub repo? Link here.

Feel free to contact us if you have any questions regarding this documentation.

Release notes

Improved

  • Usage data collection process

Fixed

  • Fixed a typo error in the DecisionMode property value of the usage tracking hit.
  • Fixed Intl property error

Updated

Fixed

  • Usage tracking collection issue

Updated

Added

  • Collecting developer usage tracking data:
    • The SDK now collects troubleshooting data, which will help us find implementation issues
    • The SDK now collects usage data, which will help us improve our product
  • disableDeveloperUsageTracking property in config object.
  • Experience continuity in bucketing mode

Updated

Added

  • campaignName, variationGroupName and variationName in Flag metadata

Updated

Added

  • fetchFlagsBufferingTime props in config object.
  • trackingManagerConfig props in config object.
  • New warning logs

Deprecated

  • trackingMangerConfig props of config object.

Updated

Added

  • Next.js 13 support
  • qt field in activate batch. It represents the time delta (in milliseconds) between when the hit reported occurred and the time it was sent.

Updated

Improved

  • SDK logs

Updated

Added

  • Third party integration in bucketing mode

Fixed

  • Experience continuous issue

Added

Deprecated

  • onUserExposure property in SDK
  • flag.userExposure method

Changed

  • logLevel for not-consent mode and panic mode

Updated

Added

  • exports field in package.json

Fixed

  • default logs manager timestamp

Updated

Added

Changed

Removed

  • activateDeduplicationTime props from FlagshipProvider

Deprecated

  • DecisionMode.API use DecisionMode.DECISION_API instead of

Updated

  • @flagship.io/js-sdk dependency to version 3.1.0

Added

Fixed

  • Typescript declaration file path issue

Added

  • visitor_consent key in the body of the campaign request

Removed

  • sendContextEvent query param from the campaign request

Fixed

  • When the envId or apiKey credentials are false / empty / null and the loadingComponent props is set, SDK still shows the loadingComponent instead of child component

Updated

  • @flagship.io/js-sdk dependency to version 3.0.14

Fixed

  • Jest auto mock issue (Pre-compile the bundle to commonJS)

Added

  • onUserExposure property in SDK Config

Updated

  • @flagship.io/js-sdk dependency to version 3.0.12

Fixed

  • When flag value from Flagship is false or 0, Flag.getValue() always returns the default value instead of flag value

Updated

  • @flagship.io/js-sdk dependency to version 3.0.11

Added

  • react-native Property in package.json file

Changed

  • Event hit property value can now only accept an integer and must not be a negative value

Updated

  • @flagship.io/js-sdk dependency to version 3.0.10

Added

  • viteJs support

Updated

  • @flagship.io/js-sdk dependency to version 3.0.8

Fixed

  • flagsData property typo issue from FlagsData to flagsData

Updated

  • deprecated fields message

Added

  • slug property in flag.metadata

Changed

  • Now lookupVisitor and lookupHits methods will be called each time visitor.fetchFlags method is called
  • When the default flag value is "null", no type checking will be performed anymore

Updated

  • @flagship.io/js-sdk dependency on version 3.0.7

Added

  • react 18 support

Updated

  • @flagship.io/js-sdk dependency on version 3.0.5

Fixed

  • Batch hit length

updated

  • @flagship.io/js-sdk dependency on version 3.0.4

Added

  • The props visitorData can now be set to null on SDK initilization in order to set it later. for example after retrieving the current user's data from the database.

  • ReactJS and React-Native as SDK_LANGUAGE in x-sdk-client http header

changed

  • No SEGMENT hits will be sent when visitor context is empty

updated

  • @flagship.io/js-sdk dependency on version 3.0.3

Added

  • useFlagship().fetchFlags method
  • useFlagship().getFlag method
  • useFlagship().setConsent method
  • useFlagship().authenticate method
  • useFlagship().unauthenticate method
  • Flag class
  • FlagMetadata class
  • Managing visitor cache
  • SDK Status / Status changed callback.
  • Visitor consent.
  • Predefined context.
  • Custom log manager

Deprecated

  • useFlagship().synchronizeModifications method
  • useFlagship().getModification method
  • useFlagship().getModificationInfo method
  • useFlagship().activateModifications method

Changed

  • useFlagship().hit.send and useFlagship().hit.sendMultiple signature

removed

  • Props enableConsoleLogs of FlagshipProvider
  • Props activateNow of FlagshipProvider
  • Props enableSafeMode of FlagshipProvider
  • Props enableErrorLayout of FlagshipProvider
  • Props nodeEnv of FlagshipProvider

Fixed

  • authenticate and unauthenticate unhandle error

Added

  • react-18 support


What’s Next