Z
Z
Zubastik_12017-10-12 08:32:39
Vue.js
Zubastik_1, 2017-10-12 08:32:39

How to display new messages as a chat in vue.js?

The task is to sketch a simple chat on vue.js. I don’t know which side to approach. The chat is not real, just a demo. For example, I write "Hello" and get back Hello, sir. I write How are you and I get a reply How are you, sir. Etc. Interested only in the moment of building the tree
Everything in the framework of studying vue.js. In JQuery, I would simply add new messages under the old ones and that would build a tree. But how to do the same in Vuejs?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2017-10-12
@Zubastik_1

Create an array in data, push a message into it, output this array in the template via v-for.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question