You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Stencil Store Version
2.0.9
Stencil Version
4.0.2
Current Behavior
I have implemented a basic store in a stencil test project. Whenever I try to set store values en reset them in my test; the test loses the context and cannot find the component anymore. If I run a single test instead of both, it does not have any issue.
my-component.tsx
import { Component, State, h } from '@stencil/core';
import { store, onStoreChange } from '../../store/store';
@Component({
tag: 'my-component',
styleUrl: 'my-component.css',
shadow: true,
})
export class MyComponent {
@State() test = true;
setTestState() {
this.test = !this.test;
}
componentWillLoad() {
onStoreChange('isActive', this.setTestState.bind(this));
}
render() {
return <div>Hello, World! I'm</div>;
}
}
Prerequisites
Stencil Store Version
2.0.9
Stencil Version
4.0.2
Current Behavior
I have implemented a basic store in a stencil test project. Whenever I try to set store values en reset them in my test; the test loses the context and cannot find the component anymore. If I run a single test instead of both, it does not have any issue.
my-component.tsx
my-component.spec.ts
store.ts
Current error
TypeError: Cannot read properties of undefined (reading '$instanceValues$')
Expected Behavior
Run both tests without any issues.
Steps to Reproduce
With the code provided in the Current behavior box the failure could be reproduced.
Code Reproduction URL
https://github.com/pimmesz/stencil-test
Additional Information
No response
The text was updated successfully, but these errors were encountered: