Make the onRemove
parameter in Watcher.attach
mandatory?
#14
Labels
discussion
There's a lot to discuss
onRemove
parameter in Watcher.attach
mandatory?
#14
Users may forget to specify this parameter, resulting in incorrect program operation when the value is deleted from the storage. So if we make it a mandatory parameter, we can reduce the impact of such an error.
You can also make it a nullable type:
There is only one negative consequence - you will have to specify it as a parameter every time and fix all the past code. On each new use, specify
null
for this parameter when it is not needed.The text was updated successfully, but these errors were encountered: