What do I need to know in order to use React as my front-end library?

Asked

Viewed 295 times

1

My doubt is divided into three points:

  • Are there types of applications where the use of React is very efficient? Or where it would be dispensable or not recommended? What would be?

  • What other technologies (libraries, frameworks, concepts, database, back-end) are commonly learned/used to use in conjunction with React?

  • How this React interaction works with Back-end and Database?

  • 3

    I would say that the question is very broad. Besides 3 questions, which is not always a problem, there is something to talk about there more than a book chapter. Apart from the lack of information. Be better compared to what? What is the best context? for whom? Starts slipping into unclear and even based on opinion. Asks for a list of things lists.

  • I think that sometimes we hold too much to the rules of questions and we stop providing useful content, even if it is based on opinion. But I understand that an exception may open precedents. I will remove the question

  • Before, know some forum in which I can ask this kind of question?

  • 1

    So the solution is to abandon the rules and let everyone do as they please?

  • 2

    No. I agree with your observation, I think you are correct and so is the site. But it does not negate the fact that we sometimes stop having useful and relevant content on the site because of it.

  • If I had agreed, I would not have asked the question and put a reward to prevent the closure. To say that you agree and do the opposite is worse than to disagree. To try to change something is one thing, to go over what has been established is another. What you’re saying is innocuous to say the least.

  • 4

    It was not clear to me if it was outside the scope. I have seen questions at the very limit of this interpretation that were answered without any problem. As for the reward I really did not know it prevented me from closing the question. It is not my intention to discuss, I just expressed my opinion. I respect your interpretation and learned from the situation. Hug!

  • It is not out of scope. The passing of others does not indicate that it is accepted. GIVE an example of a question that you think is in the same line as this.

  • 1

    For me an example was this: https://answall.com/questions/19548/o-que-really%C3%A9-ddd-e-when-it-applies, but looking more carefully I already see the difference.

  • 4

    I’ll tell you one thing: any and every framework arises to solve a problem. Understand the problem and you’ll understand the framework. If there is no problem, the framework should not even exist.

  • With a bit of luck it may be possible to answer the second question if there is any source for a study of the techniques that are used with React. But none of the other questions make sense. Existem tipos de aplicações onde o uso do React é muito eficiente? Ou onde ele seria dispensável ou não recomendado? Quais seriam? - You can virtually use any framework in any situation, especially when you’re talking about UI frameworks like React. Como funciona essa interação do React com Back-end e Banco de dados? - The same way it works with another framework

  • @Brunocosta is not even my intention to answer, I’m already studying everything on my own and I started an online course of React, soon maybe I will answer myself. But as for your questions, I think if you were asked, it’s because these doubts that seem obvious to those who master some subjects were not obvious to me. I am in a community where there are perhaps the best Brazilian and Portuguese specialists, and at the same time the most beginners. So it is always worth consulting the most experienced, to take a direction and the path of learning to be shorter.

  • Even if it is to answer that the doubts do not make sense and why they do not. You say this already helps and clarifies something.

Show 8 more comments

3 answers

2


I will answer because I believe that these very broad questions can be answered with an introduction to their parts and, if necessary, the author can search for more information from those parts in other questions

Are there types of applications where the use of React is very efficient? Or where it would be dispensable or not recommended? What would be?

The question you should ask first is i need to use a library/framework?, something that is very simple, for example, a static page that at most sends a contact email or an application that you made for your own use just to register reminders, is not something that requires another dependency

Now, assuming your application deserves a library or framework, does React have something that makes it perfect for a particular situation? No, in general any one you use will have a good result (at least the main ones: React, Vue and Angular)

Although the library itself has nothing to make it special, people who use it may prefer one or the other, for example:

  • Someone who already knows the language, but not very much the tools and structure, and is entering the world of javascript libraries/frameworks, can prefer Angular as a framework, is more complete, already comes with a ready-to-use structure, the CLI (Command Line Interface) that helps a lot in creating files

  • A team in which one party uses one and does not like the other, Vue is the middle ground, if you know one of them, you can use the others peacefully but, among the three, a change from React or Angular to Vue is more succinct than From Angular to React and vice versa

  • Among the three React has been the preferred (from what I see, only a perception without scientific method, I may be mistaken) to be used with Three to create 3D interfaces, does not mean that it is not possible with others

What other technologies (libraries, frameworks, concepts, database, back-end) are commonly learned/used to use in conjunction with React?

How this React interaction works with Back-end and Database?

I’ll put these questions together because part of the answer would be for both

In general you will not use any library or framework to connect to a database, you can even use Websql, Localstorage or Sessionstorage, but it is less than 1% of cases, but you will probably want to save the logged in user data in one of the last two and this is equal to pure javascript

What you will do is communicate with your back (which can be in any language) and it with your database (either SQL or Nosql), for this you will perform asynchronous HTTP calls, this is the utility of Axios, where you have methods like Aios.get and Axios.post that return a Promise that can be used with Promise.then and Promise.catch or async and await. This is just a library, there are others that can be used

If your back is a Baas, you should use the library it offers for React, for example, Firebase has Reactfire

Also, you should have at least a notion of some other things:

Maybe you won’t be using it all up there in a single project, but it’s interesting to have a good foundation

  • 1

    It was exactly the answer I was looking for. Sometimes we want to learn something that we realize is looking for professionals, but before learning it is always good to understand what it is in a broader context (something that we usually do not find in tutorials on the internet), which you managed to pass on in a concise and objective answer, even in a question that did not have those same characteristics. You understood well what I intended.

0

1 - The React can be used in any type of application, of course if it is for a static page, for example, there is not much need to use it, you can use jquery for this. I advise using tools like React, Vue and angular for slightly larger applications where you have many pages and components.

2 and 3- Wow, that depends a lot. You can use ruby on Rails, Laravel and other backend frameworks. And bank you can use anyone too, here at the company where I work we usually divide the projects. So all our backend is an api (Rails + graphQL picking up Mysql data) and we have the frontend communicating with this api picking up the data through the Axios or Apollo. But you can do it all in one project anyway. You can check out some related things in these links below:

React + Lockable: https://code.tutsplus.com/tutorials/build-a-react-app-with-laravel-backend-part-2-react--cms-29443

Rails + graphQL + React https://www.youtube.com/watch?v=jXsGSADDlNw

  • In addition, from what I have researched, it is good for the ease of component reuse, ease of maintenance, testability and performance. I imagine that its use in a simple site, with little or no interactivity, can not take advantage of these benefits, making its use unnecessary. As for libraries, concepts and so on, I don’t think I can really answer, it was a question from someone who had no basis whatsoever. And as for the back-end interaction, I now understand that it’s by API, no matter the language or the database.

0

Friend from my experience with React, it is interesting to use more if you want to make a front end of a web system with a good performance and if you need to manipulate data through the page.

If you want to do one more project with a kind of static page and without much data manipulation and simple Jquery can be very useful for you!

To communicate with the back-end is through http protocol, it uses much the Xios that helps to manipulate the http calls! Very interesting and I recommend to those who are starting!

  • What is the Axios?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.