Closed JasonLandbridge closed 1 year ago
I see my IDE messed up the formatting, fixing now
@DanWahlin If you're okay with this change, would you maybe prefer a static getter or is a static function fine?
Thanks @JasonLandbridge! Appreciate the contribution. I haven't run across this particular scenario but I think having that type of information about the state is useful. It still keeps things simple which is my overall goal for the library.
As far as function versus getter, as I was looking through the PR I wondered about that as well. I'd lean toward the getter since the existing functions are all actions (getXX, setXX, dispatchXX, resetXX, etc.).
My pleasure, I in turn appreciate this awesome library! I agree and have changed it to a static getter and changed the ReadMe accordingly. I did keep the IsStoreInitialized
name since it returns a boolean
Thanks! I'll try to get the new version published as soon as I have a chance.
Awesome, thanks! No rush!
Updated to 2.2.15 as a heads-up. Thanks again!
There are situations where it might be useful to check if the store state has already been initialised. Currently I ran into this problem when creating unit tests for individual services where I would like (maybe not smart?) to let those services initialise the state when it hasn't happened yet.