Skip to content

Commit

Permalink
Merge branch 'main' into react/feat/wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli authored Nov 2, 2023
2 parents 7e1f097 + 933c43e commit d1a04f7
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 11 deletions.
3 changes: 1 addition & 2 deletions configs/test-utils/src/ThrowError.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { PropsWithChildren } from 'react'
import { useEffect, useLayoutEffect, useRef, useState } from 'react'

const isClient = typeof window !== 'undefined'
export const useIsomorphicLayoutEffect = isClient ? useLayoutEffect : useEffect
export const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect

export const useTimeout = (fn: () => void, ms: number) => {
const fnRef = useRef(fn)
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,8 @@
"typescript": "^5.1.6",
"vite": "^4.4.9",
"vitest": "^0.34.6"
},
"volta": {
"node": "18.16.1"
}
}
7 changes: 7 additions & 0 deletions packages/react-query/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @suspensive/react-query

## 1.18.2

### Patch Changes

- Updated dependencies [a06c31f]
- @suspensive/react@1.18.2

## 1.18.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/react-query/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@suspensive/react-query",
"version": "1.18.1",
"version": "1.18.2",
"description": "Useful helpers for @tanstack/react-query with suspense",
"keywords": [
"suspensive",
Expand Down Expand Up @@ -71,7 +71,7 @@
"tsd": "^0.28.1"
},
"peerDependencies": {
"@suspensive/react": "workspace:^1.18.1",
"@suspensive/react": "workspace:^1.18.2",
"@tanstack/react-query": "^4",
"react": "^16.8 || ^17 || ^18"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @suspensive/react

## 1.18.2

### Patch Changes

- a06c31f: fix(react): remove useless variable assigning in useIsomorphicLayoutEffect

## 1.18.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@suspensive/react",
"version": "1.18.1",
"version": "1.18.2",
"description": "Useful interfaces for React Suspense",
"keywords": [
"suspensive",
Expand Down
3 changes: 1 addition & 2 deletions packages/react/src/hooks/useIsomorphicLayoutEffect.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import { useEffect, useLayoutEffect } from 'react'
const isClient = typeof window !== 'undefined'
export const useIsomorphicLayoutEffect = isClient ? useLayoutEffect : useEffect
export const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions websites/visualization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"@emotion/react": "^11.10.8",
"@emotion/styled": "^11.10.8",
"@jsxcss/emotion": "^1.3.9",
"@suspensive/react": "workspace:1.18.1",
"@suspensive/react": "workspace:1.18.2",
"@suspensive/react-await": "workspace:0.0.4",
"@suspensive/react-query": "workspace:1.18.1",
"@suspensive/react-query": "workspace:1.18.2",
"@tanstack/react-query": "^4.29.5",
"@tanstack/react-query-devtools": "^4.29.5",
"@vercel/analytics": "^1.1.1",
Expand Down

0 comments on commit d1a04f7

Please sign in to comment.