Skip to content

Commit

Permalink
fix #49
Browse files Browse the repository at this point in the history
  • Loading branch information
RenaudRohlinger committed Apr 1, 2024
1 parent 6a65a7e commit 292adb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 23 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "r3f-perf",
"version": "7.2.0",
"version": "7.2.1",
"description": "Easily monitor your ThreeJS performances.",
"keywords": [
"react",
Expand Down Expand Up @@ -66,7 +66,7 @@
"@react-three/drei": "^9.103.0",
"@stitches/react": "^1.2.8",
"@utsubo/events": "^0.1.7",
"zustand": "~4.1.5"
"zustand": "~4.5.2"
},
"peerDependencies": {
"@react-three/fiber": ">=8.0",
Expand Down
20 changes: 2 additions & 18 deletions pnpm-lock.yaml

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

6 changes: 3 additions & 3 deletions src/store.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import create from 'zustand'
import shallow from 'zustand/shallow'
import { createWithEqualityFn } from 'zustand/traditional'
import { shallow } from 'zustand/shallow'
import * as THREE from 'three'

type drawCount = {
Expand Down Expand Up @@ -87,7 +87,7 @@ const getCustomData = () => {
return getPerf().customData
}

export const usePerfImpl = create<State>((set, get): any => {
export const usePerfImpl = createWithEqualityFn<State>((set, get): any => {
function getReport() {
const { accumulated, startTime, infos } = get()
const maxMemory = get().log?.maxMemory
Expand Down

0 comments on commit 292adb1

Please sign in to comment.