Skip to content

Commit b2c28c8

Browse files
committed
feat: add integration tests for FlagshipProvider and utility hooks
1 parent ab7477e commit b2c28c8

3 files changed

Lines changed: 1013 additions & 2 deletions

File tree

src/FlagshipHooks.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,10 @@ export const useFlagship = (): UseFlagshipOutput => {
5959
const { state } = useContext(FlagshipContext)
6060
const { visitor, config } = state
6161

62-
// Use refs to prevent callback recreation on visitor changes
6362
const visitorRef = useLatestRef(visitor)
6463
const configRef = useLatestRef(config)
6564
const stateRef = useLatestRef(state)
6665

67-
// Memoize context to prevent unnecessary recreations
6866
const visitorContext = useMemo(
6967
() => ({ ...visitor?.context }),
7068
[JSON.stringify(visitor?.context)]

0 commit comments

Comments
 (0)