React
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
- @flagship.io/js-sdk dependency to version 3.3.2
Fixed
- Usage tracking collection issue
Updated
- @flagship.io/js-sdk dependency to version 3.3.1
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
- @flagship.io/js-sdk dependency to version 3.3.0
Added
- campaignName, variationGroupName and variationName in Flag metadata
Updated
- @flagship.io/js-sdk dependency to version 3.2.6
Added
fetchFlagsBufferingTime
props in config object.trackingManagerConfig
props in config object.- New warning logs
Deprecated
trackingMangerConfig
props of config object.
Updated
- @flagship.io/js-sdk dependency to version 3.2.5
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
- @flagship.io/js-sdk dependency to version 3.2.4
Improved
- SDK logs
Updated
- @flagship.io/js-sdk dependency to version 3.2.2
Added
- Third party integration in bucketing mode
Fixed
- Experience continuous issue
Added
- OnVisitorExposed callback in config object
Deprecated
- onUserExposure property in SDK
- flag.userExposure method
Changed
- logLevel for not-consent mode and panic mode
Updated
- @flagship.io/js-sdk dependency to version 3.1.4
Added
- exports field in package.json
Fixed
- default logs manager timestamp
Updated
- @flagship.io/js-sdk dependency to version 3.1.2
Added
- Hits are now sent with a batch processing system see
- trackingMangerConfig props of FlagshipProvider
- DecisionMode.DECISION_API enum in decisionMode props of FlagshipProvider
- close method in useFlagship hook
Changed
- Interface IHitCacheImplementation
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
- onLog props in SDK Config
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
or0
, 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
Updated 5 months ago
What’s Next