Replace Atom.value with Atom.get() (#2189)
This PR replaces the `.value` getter for the atom with `.get()` ### Change Type - [x] `major` — Breaking change --------- Co-authored-by: David Sheldrick <d.j.sheldrick@gmail.com>
This commit is contained in:
parent
260a31db81
commit
5db3c1553e
131 changed files with 1388 additions and 929 deletions
|
@ -17,7 +17,7 @@ test('useAtom returns an atom', async () => {
|
|||
})
|
||||
|
||||
expect(theAtom).not.toBeNull()
|
||||
expect(theAtom?.value).toBe('a')
|
||||
expect(theAtom?.get()).toBe('a')
|
||||
expect(theAtom?.name).toBe('useAtom(myAtom)')
|
||||
expect(view!.toJSON()).toMatchInlineSnapshot(`"a"`)
|
||||
|
||||
|
@ -44,7 +44,7 @@ test('useAtom supports taking an initializer', async () => {
|
|||
})
|
||||
|
||||
expect(theAtom).not.toBeNull()
|
||||
expect(theAtom?.value).toBe('a')
|
||||
expect(theAtom?.get()).toBe('a')
|
||||
|
||||
expect(theAtom?.name).toBe('useAtom(myAtom)')
|
||||
expect(view!.toJSON()).toMatchInlineSnapshot(`"a"`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue