Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Add oldState value in stateChanged mixin #66

Open
theolavaux opened this issue Oct 6, 2020 · 0 comments
Open

Add oldState value in stateChanged mixin #66

theolavaux opened this issue Oct 6, 2020 · 0 comments

Comments

@theolavaux
Copy link

Would it possible to add an oldState value object to the Javascript mixin stateChanged ? I'm using LitElement with Redux and it's a bit cumbersome to have to bind a class variable to a Redux variable to track previous changes regarding this variable.

const user = { age: '20', lastname: 'Johnson', firstname: 'Mark' }

If I have this object in Redux for example, and I would like to access to the old value firstname, I would have to bind it to a class variable using this._firstname = state.... in the stateChanged mixin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant