Is there a way to write some sort of "control" so that when one runs a package containing dynamic module (say the one below by <<package.wl), closes the notebook and then reopens it and runs again (by shift+enter on <<package.wl), the values that were entered in previous session are kept the same? So basically I want to prevent the erasing of values by double run.
BeginPackage["test`"]
Begin["`Private`"]
Print@DynamicModule[{x,d},x=Array[d,2];Row[{InputField[Dynamic[x]], Dynamic[x^2]}]]
End[]
EndPackage[]