<h3 dir="auto">Version</h3>
<p dir="auto">2.4.1</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://github.com/tiagofelipe/vue-store-bug">https://github.com/tiagofelipe/vue-store-bug</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">In src/app/auth/services/auth.js i need to import the store "import store from '../../../store'", but an error occurred:</p>
<p dir="auto">Uncaught TypeError: Cannot read property 'state' of undefined</p>
<p dir="auto">Turns out I wasted a lot of time trying to understand the problem, and then I realized that one of the vuex modules was not being loaded, called auth.</p>
<p dir="auto">After several tests, I discovered that, inside my import file of the store modules "src/app/store.js" the following problem occurred:</p>
<p dir="auto">import {store as auth} from './auth' - always returns the error even though I changing the address to './auth/index.js'</p>
<p dir="auto">Then I duplicated the file './auth/index.js' with a new name './auth/teste.js', keeping the code identical in both files, and changed the import to:</p>
<p dir="auto">import {store as auth} from './auth/teste' - this made it work</p>
<p dir="auto">Without understanding why this happens, I decided to report the problem.</p>
<p dir="auto">If I remove the import store from file 'src/app/auth/services/auth.js', the application returns to normal operation, vuex also works normally and can even load the auth module.</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">Load vuex modules and application work</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">Uncaught TypeError: Cannot read property 'state' of undefined</p>
<h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">因为dom隐藏下，其宽度或者高度为0，但是偏偏有些组件需要用到这个高度宽度，比如自定义的滚动条，轮播等等。<br>
这类的组件一般都有自己的refresh的方法。<br>
为开发过程中为了追求更快的渲染速度使用的是v-show的方案，虽然可以通过v-show对应data的watch去监听 但是这就要组件对外暴露对应的refresh方法，而不能从组件内部的show钩子去实现刷新，这似乎并不怎么优雅。<br>
综上，我希望可以增加show或者hide钩子函数，或者有其他替代方案也是可以的</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">如同钩子函数一样，或者类似的插件也是可以的</p>