S
S
sasha_jarvi2021-06-04 10:50:30
Vue.js
sasha_jarvi, 2021-06-04 10:50:30

Why is rootState.settingsModule.settings returning null?

The following question arose on vuex: there is a module indicatorsModule, from this module you need to access data from another module - settingsModule. If you const settingsListpass as a value rootState.settingsModule, then in the console it is easy to see that the object settingsModulehas the desired property settings:

60b9da91b46f9531105518.png

However, if you try to access the property settings, then the console will display null:

60b9db069fbcc402124601.png

At the same time, on the Network tab, it is easy to see that the request to settingsleaves and successfully returns a response:

60b9db27405f4751750915.png
60b9db2e3e459173718446.png

How avoid this behavior?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question