Unlike other major JS frameworks such as Angular, why does ReactJS need so many external tools to build an app? [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I've been coding React for the last couple of months now. I thought, initially, just going through the React official docs would be sufficient. But I've had to learn some other tools in order to really make my apps useful/easier to developer. For example, tools like Redux and react-router. How come these tools don't already come with React officially? What's the true purpose of React vs other JS frameworks?

ReactJs is not a framework ,it's a JavaScript library and it's not a language ,it's build upon JavaScript . It's a way to solve your common problems and complex tasks easy to do.

Angularjs/Angular is a fully fledged framework - it gives you built-in solutions for promises ($q), ajax calls ($http), routing and intra-component communication via services amongst others.
Reactjs on the other hand is much less opinionated. It provides a mechanism to layout and structure view code and practically nothing else (from the list above). So it's much lighter weight and you are much freer to use other libraries/packages where you feel it is necessary.

Related

Can I use multiple frameworks on a single website page? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
Can I use multiple frameworks on a single website page?
I try to use multiple frameworks like Angular, Vue, or React in one website view .. is that good or we can only use one
Yes. It is usually done in big enterprise setting with many separate front-end teams each responsible for a smaller portion of a single web app. Architecting a clean approach for it can be difficult so I recommend that you avoid it if you can. Problems include:
How to handle routing such that intra- and inter-framework routes work.
How to share state (such as auth tokens) between apps.
How to share components (and code in general) between apps.
How to avoid importing the same library used by separate frameworks twice.
A popular approach is called micro frontends which mimics the micro service approach for the front end. I’m not aware of any research for how well this works in the wild.
An example (meta) framework that handles this kind of architecture for you is single-spa.

JavaScript or React - database security in single-page website [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
Welcome stackoverflow community.
I'm doing small project, simple single-page website. It will also contain contact form which takes user to different page. I decided to create a database since on website I will do few responsive features ie. booking calendar where occupied dates won't be available. I wrote all my projects in vanilla js so far. I'm wondering that adding react to this project will be overkill.
I did research and know roughly cons and props for using it but I couldn't find answer if react gives you some extra safety features comparing to using vanilla js over attacks to website, and if yes, does it makes sense to write whole project in react just for those features?
Many thanks for any feedback.
I don't think you should be rewriting your app in react just for security. If you have any sensitive information. You should be keeping it on the server and not on the front-end.
For a small project. Vanilla JS can be enough. React is just for helping you manage and create UI components. It will not give you any extra security as it is still javascript in the end.

Performance comparison between react js and Angular js? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I have worked in Angular js and find it to be developer friendly and ease of use is awesome. I found out it performs extremely good with SPA(Single page application) architecture and if controller scope variables are not misused.
I however don't know why most of eCommerce companies complaining angular being not performing equivalent to reactjs. I think in lot of use cases might not event found the visible performance difference, with development effort being less.
Angular followed MVC ideology, while React is developed with MVVM design. I don't consider myself a very good programmer in either of them, anyways I have started learning reactjs, so I want to know should I go for react js for my own project or not, one clear advantage is isomorphic rendering.
I tried to make this a comment but ran out of space :)
As with anything, it is as fast as the developer can make it :) A good AngularJS developer can make an app that is faster than a bad developer creating a React app.
Having said that, React will be faster out of the box with a LARGE amount of elements on screen. AngularJS will require some knowledge to make it fast with lots of on screen elements. But I fully expect for most people they won't ever see any performance drop with most apps. E.g. if you want to make a fairly complex application with a couple of hundred dynamic objects on screen you shouldn't see many performance problems.
If you do choose AngularJS [my preferred framework] I would suggest following the latest component guidelines as it will help you build a performant application.
As an indicator I am working on an asset tracking AngularJS app. We can track around 2000 elements on screen a map at once with lots of additional information and this works pretty fast. It took a lot of work to get there though. It also works great on mobile too :)

How to evaluate front-end frameworks? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I would like to understand how to conduct an independent evaluation of available popular JS front-end frameworks (React/Redux, Vue, Angular and others) for use in a new app we are trying to build ground up.
Many references online end up with conclusions and rates one framework over another. However, I find it difficult to relate with. Say, one report says learning curve for Vue is simpler than JSX for React. I don't find that argument very meaningful since it depends on one's exposure and idea of modularizing a UI component.
So, this SO question is raised to get receive a mixed bag of evaluation suggestions/strategies/schemes to conduct an independent inquiry into these available and popular frameworks.
What themes and approaches can I consider to evaluate popularly available front-end frameworks ?
Please advise.
This answer is given by jeremy-d and copy paste his answer because i
love react and i found react more interesting to work. It's be 1 year
in react and the react community is also very active.
https://stackoverflow.com/users/856942/jeremy-d
Advantages of using React:
easy to know how a component is rendered, you just look at the render function.
JSX makes it easy to read the code of your components. It is also really easy to see the layout, or how components are plugged/combined with each other.
you can render React on the server-side.
it is easy to test, and you can also integrate some tools like jest.
it ensures readability and makes maintainability easier.
you can use React with any framework (Backbone.js, Angular.js) as it is only a view layer.
What is not so good about React?
it is only a view layer, you have still to plug your code for Ajax requests, events and so on. Some people get surprised by that.
the library itself is pretty large.
the learning curve can be steep.
If react-native is really how it was described, react is going to become even bigger.
Performance wise, it is really good as it relies on a virtual-dom to know what is really changing in your UI and will re-render only what has really changed. It does have trouble with very large, slightly changing, lists of children (2000 <li> test), but can be optimized simply.
If you are not sure, just think about the big projects using React:
instagram, hipchat, facebook chat and so on.
Some resources:
React for the stupid people
Rebuilding Hipchat with React
Why React?
And probably one of my favorite blog post Why React is awesome?
The community behind a framework is one of the most important factors for me. I want to be able to find answers on Stack Overflow for my questions, and I want to be able to find libraries and packages I can use that are actively maintained.
I like React most of all because it is easy to integrate into some other backend framework e.g. Rails.

Angular2 or React or any other [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I've worked on multiple angular 1 projects and I totally loved it . We have few projects in the pipeline for which I need to provide recommendations for JavaScript frontend libraries/ frameworks . Since angular 1 is fading and angular 2 is a total redesign with considerable amount of bad reviews is it a good idea to move to angular 2 ( I've read in some articles recently that angular 4 is in horizon) . I've used a little bit of react as well but for some reason didn't really liked JSX. Saying that React is also one of our options . Lately I've been listening a lot about vue.js ( not really sure if we are going to use it)
If you can provide some insights in selecting one framework over the other that would be really helpful
Thanks
Angular, React and vue.js are all very mature libraries/frameworks. I would recommend you and anybody with the same question to try all of them. Doing a simple TODO list app might be enough for anybody to see if the like a library/framework or not. If you didn't really like JSX, give a try to vue.js and choose the one you feel more confident with.
Also, posting this kind of question here might not be the best choice. I would suggest you to ask them on a website like Quora
Recommendations? - Angular!
Why?
I am have been using angular for about 3 years and still counting. I have found very well defined answers to my queries. I don't like their documentation. Some are very brief and some very detailed that finding [small] one, is hard. There are 100s of advantages i can give for Angular-why? - because i have used. There are many libraries that are evolving for the use of angular. And yes, angular is constantly evolving, and am excited about Angular4.
why not React? - I have used it too, but i did not like it. And the preferences and solutions to the problems are hard to find compared with Angular.
As you already have learnt and practiced angular, angular2 would not be a problem nor i think angular4 should either. But if you take on React, you will probably divert your way out Angular.
Disclaimer: This is completely personal approach and review.

Categories