Get started with immer CDN
MIT licensed
Immer is a produce-friendly state container for JS applications.
Tags:- immutable
- mutable
- copy-on-write
Stable version
Copied!
How to start using immer CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with immer CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/immer/10.0.4/cjs/immer.cjs.production.min.js"></script>
</head>
<body>
<button id="update">Update</button>
<script>
const state = produce((draftState) => {
draftState.counter = draftState.counter + 1;
}, { counter: 0 });
const button = document.getElementById('update');
button.addEventListener('click', () => {
const updatedState = produce(state, (draft) => {
draft.counter += 1;
});
console.log('Updated state:', updatedState);
});
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
10.0.0
10.0.0-beta.1
10.0.0-beta.2
10.0.0-beta.3
10.0.0-beta.4
10.0.0-beta.6
10.0.0-beta.7
10.0.1
10.0.2
10.0.3
10.0.3-beta
10.0.4
10.0.4-beta
10.1.0
*** 10.1.1
6.0.0
6.0.0-fix-425-2
6.0.1
6.0.2
6.0.3
6.0.4
6.0.5
6.0.6
6.0.7
6.0.8
6.0.9
7.0.0
7.0.1
7.0.10
7.0.11
7.0.12
7.0.13
7.0.14
7.0.15
7.0.2
7.0.3
7.0.4
7.0.5
7.0.6
7.0.7
7.0.8
7.0.9
8.0.0
8.0.1
8.0.2
8.0.3
8.0.4
9.0.0
9.0.0-beta.0
9.0.0-beta.1
9.0.1
9.0.10
9.0.11
9.0.12
9.0.13
9.0.14
9.0.15
9.0.16
9.0.17
9.0.18
9.0.19
9.0.2
9.0.20
9.0.21
9.0.3
9.0.4
9.0.5
9.0.6
9.0.7
9.0.8
9.0.9