A
A
andreyi42021-07-01 13:45:03
Vue.js
andreyi4, 2021-07-01 13:45:03

Vue 3 How to re-render a component from another branch?

There is a simplified structure like this:

Dashboard: {
  TheModal: {
    TaskFormAdd
  },
  TheContent: {
    BoardInbox: {
      TaskList: {
        TaskListItem
      }
    },
    BoardToday: {
      TaskList: {
        TaskListItem
      }
    }
  }
}

How to re-render TaskList from TaskFormAdd?
Or how to re-render the desired component anywhere?

TaskFormAdd, BoardInbox, BoardToday components are added dynamically.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2021-07-01
@andreyi4

If for some reason you feel like manually "re-rendering" a component, you're probably doing something wrong. Vue itself manages the display of data depending on this very data. Therefore, in your case, TaskFormAdd should change the data, and TaskList should react to these changes and change the display.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question