lindelwa122 / dom-wizard

JavaScript library that makes DOM manipulation easy and more managable.
MIT License
7 stars 8 forks source link

Improved createStore() Funtionality #25

Closed sinster2003 closed 9 months ago

sinster2003 commented 9 months ago

@lindelwa122 createStore() creates the store with no data loss and reload expection.. can be invoked only once.

sinster2003 commented 9 months ago

@lindelwa122 I have updated and changed the createStore(). Do feel free for any suggestions.

sinster2003 commented 9 months ago

Hey @lindelwa122 I have figured out the changes that can be made ...

I think your previous thought process of createStore was absolutely right making it invokable only once and i feel that implementation is better than overwriting the store again and again, conceptually it doesn't sound good. If i give overwriting as the primary feature I just feel the importance of updateState will decrease multifolds. So we will proceed with the previous approach. I tested the changed code and it did work. If changes needed do feel free.

lindelwa122 commented 9 months ago

It looks good, I will merge your PR. You are right about createStore(), it still should be invoked once. One function that is missing is getState(), a user should be able to get the state of a variable from any page.

Thanks, @sinster2003, for putting efforts toward this function.