Skip to content

Commit

Permalink
feat: dev mode use named symbol (#434)
Browse files Browse the repository at this point in the history
feat: dev mode use named symbol
  • Loading branch information
ahaoboy authored Apr 21, 2022
1 parent 6aaebd8 commit 5f9bb4d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/vanilla.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { getUntracked, markToTrack } from 'proxy-compare'

const VERSION = Symbol()
const LISTENERS = Symbol()
const SNAPSHOT = Symbol()
const HANDLER = Symbol()
const PROMISE_RESULT = Symbol()
const PROMISE_ERROR = Symbol()
const VERSION = __DEV__ ? Symbol('VERSION') : Symbol()
const LISTENERS = __DEV__ ? Symbol('LISTENERS') : Symbol()
const SNAPSHOT = __DEV__ ? Symbol('SNAPSHOT') : Symbol()
const HANDLER = __DEV__ ? Symbol('HANDLER') : Symbol()
const PROMISE_RESULT = __DEV__ ? Symbol('PROMISE_RESULT') : Symbol()
const PROMISE_ERROR = __DEV__ ? Symbol('PROMISE_ERROR') : Symbol()

type AsRef = { $$valtioRef: true }
const refSet = new WeakSet()
Expand Down

1 comment on commit 5f9bb4d

@vercel
Copy link

@vercel vercel bot commented on 5f9bb4d Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

valtio – ./

valtio-pmndrs.vercel.app
valtio-git-main-pmndrs.vercel.app
valtio.pmnd.rs
valtio.vercel.app

Please sign in to comment.