Closed
Description
Concerning the example in Immutable Data ,
//here
import produce from 'immer'
import { shallowRef } from 'vue'
export function useImmer(baseState) {
const state = shallowRef(baseState)
const update = (updater) => {
state.value = produce(state.value, updater)
}
return [state, update]
}
immer.js has undergone changes in its export patterns and the example in the Playground maybe outdated and requires attention.
Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/immer.js?v=46fe6564' does not provide an export named 'default' (at immer.js:1:8)
Metadata
Metadata
Assignees
Labels
No labels