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:
Steve Ruiz 2023-11-13 11:51:22 +00:00 committed by GitHub
parent 260a31db81
commit 5db3c1553e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
131 changed files with 1388 additions and 929 deletions

View file

@ -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"`)