P
P
po4emuch2019-11-13 20:50:44
JavaScript
po4emuch, 2019-11-13 20:50:44

What is the best way to implement a web application on vue js?

I'm going to write a web application like "Avito" and along the way learning Vue js. I am practically unfamiliar with reactive frameworks, except verbally. Now I'm at the stage of creating modules for posts. Each post is "divided" into 3 parts: the upper one, which contains an avatar, first name, last name, date of registration, the middle one, which contains a description, and the lower one, which contains rating, views, etc. And then there was the issue of implementation. What is the best way to write components? Make one common for the entire post, split into top, middle and bottom. Or even make a separate component for each part of the post?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rustam Azizov, 2019-11-13
@po4emuch

The essence of the component approach is as follows:
1) Logic and presentation are separated from each other
2) The functionality is divided into weakly dependent and reusable components
3) Components are assembled in various combinations, realizing the finished application
Therefore, the answer to your question is as follows:
1) Break everything into as simple as possible ( but not simpler) reusable components
2) Combine them into larger components and combine the largest of them in the application root (the file in which the root instance of Vue starts) into a finished application

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question