Subscribe on changes!

After calling the data api and updating the routes of vuex, props from Navbar are reactive, but the view nothing happened.

avatar
Jan 19th 2022

Version

3.2.26

Reproduction link

codesandbox.io

Steps to reproduce

My Submenu list of Navbar needs to call the api to get the category and addRoute (Picture 2) and update the routes in vuex (Picture 1); However, I found that if Submenu as component, using console.log(props.list) the data was updated, but the view nothing happened (Picture 3). If not using component (Picture 4), it was working fine. If I want to use component, what is the solution?

What is expected?

Update the view when routes update.

What is actually happening?

The view not update but using console.log(props.list) the data was updated.

1 2 3 4
avatar
Jan 19th 2022

Please provide a minimal reproduction, not a whole app.

You can ask the community for help in pinpointing the issue to provide a better reproduction.