Module
x/valtio/tests/__snapshots__/macro.test.ts.snap
π Valtio makes proxy-state simple for React and Vanilla
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`valtio/macro 1. valtio/macro: 1. valtio/macro 1`] = `
import { useProxy } from '../dist/macro'
const Component = () => { useProxy(state) return ( <div> {state.count} <button onClick={() => ++state.count}>inc</button> </div> )}
β β β β β βimport { useSnapshot as _useSnapshot } from 'valtio'const Component = () => { const valtio_macro_snap_state = _useSnapshot(state) return ( <div> {valtio_macro_snap_state.count} <button onClick={() => ++state.count}>inc</button> </div> )}
`;
exports[`valtio/macro 2. valtio/macro: 2. valtio/macro 1`] = `
import { useProxy } from '../dist/macro'
const Component = () => { useProxy(state) return ( <div> <button onClick={() => { ;(() => ++state.count)() ++state.count }}>inc</button> {state.count} </div> )}
β β β β β βimport { useSnapshot as _useSnapshot } from 'valtio'const Component = () => { const valtio_macro_snap_state = _useSnapshot(state) return ( <div> <button onClick={() => { ;(() => ++state.count)() ++state.count }}> inc </button> {valtio_macro_snap_state.count} </div> )}
`;