Skip to content

Commit

Permalink
fix: test release
Browse files Browse the repository at this point in the history
  • Loading branch information
rkulinski committed Nov 23, 2023
1 parent 9d9ecb9 commit ce38404
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-ranger/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { RangerConfig, RangerOptions, Ranger } from '@tanstack/ranger'
export * from '@tanstack/ranger'

const useIsomorphicLayoutEffect =
typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect
typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect

export function useRanger<TTrackElement>(
options: RangerOptions<TTrackElement>,
): Ranger<TTrackElement> {
const rerender = React.useReducer(() => ({}), {})[1]
const resolvedOptions: RangerConfig<TTrackElement> = {
...options,
rerender,
rerender: rerender,
onChange: (instance) => {
rerender()
options.onChange?.(instance)
Expand Down

0 comments on commit ce38404

Please sign in to comment.