What should I know to be able to use React as my front-end library?

1

My question is divided into three points:

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

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

  • How does this React interaction work with Backend and Database?

asked by anonymous 26.07.2018 / 16:31

3 answers

2

I will respond 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 of these parts in other questions

  

Are there types of applications where using React is very efficient? Or where would it be dispensable or not recommended? What would they 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 did for your own use just to register reminders, it is not something that needs another dependency

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

Although the library itself does not have something that makes it special, people who are going to use it may prefer one or the other, for example:

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

  • A team that uses one and does not like another, Vue is the middle ground, if you know one of them, you can use others calmly, but among the three, a change of React or Angular for Vue is more succinct than De Angular for React and vice versa

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

  

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

     

How does this React interaction work with Backend 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 user data logged in to any of the latter 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 bank (either SQL or NoSQL), for this you will perform asynchronous HTTP calls, this is the utility of the 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 provides for the react, eg Firebase has ReactFire

In addition, you should have at least a sense of some other things:

Maybe you will not use everything there in a single project, but it is interesting to have a good foundation

    
03.08.2018 / 03:09
0

Friend for my experience with React, it's interesting to use more if you plan to make a front end of a web-system with good performance and if you have to manipulate data across the page.

If you're going to do another project with a static page and a bit of data manipulation, Jquery can be very useful for you!

To communicate with the back end is through http protocol, if you use a lot the axios which helps to handle http calls! Very interesting and point to who is starting!

    
01.08.2018 / 02:56
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 such as 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 among other backend frameworks. And bank you can use any one too, here in the company where we work we usually split the projects. Then all of our backend is an api (rails + graphQL picking up data from MySQL) and we have the frontend communicating with this api by taking the data through the axios or apollo. But you can do it all in one project. You can check out some things related to these links below:

react + laravel: link

Rails + graphQL + react link

    
01.08.2018 / 20:56