Last active
September 20, 2017 23:28
-
-
Save dounan/ce0a7c3b88f2310dfb5aedd618c804cb to your computer and use it in GitHub Desktop.
Example of nested sentinel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import makeSentinel from 'mutation-sentinel'; | |
const obj = {array: [{}]}; | |
const wrappedObj = makeSentinel(obj); | |
wrappedObj.array[0].value = "oops"; // MUTATION DETECTED BY SENTINEL! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment