You can translate the content of this page by selecting a language in the select box.
As a web developer, can you explain why React is needed?
In the early days of the internet, web sites were essentially made of static HTML files. Web servers were little more than file servers, when a user would come to a url, the web server would simply fetch it, and send it to the user via their browser, along with all kind of assets, like fonts and images.

The functionality of this kind of web pages are very limited, so eventually the web became more dynamic. When people would visit a page or interact with a form, instead of just fetching data, the server could perform an operation and prepare some content on demand. That content would still be sent to the user’s browser. There could also a little bit of code running on the browser, to animate pages, handle form and what not, but not very much.
So up until around 2010, that was the dominant model. Code could be involved to generate content but the browser wouldn’t do much, most of the logic would happen on servers which would just send prepared content to the browser.
However, in the early 2010s, this paradigm started to shift. With HTML5/CSS3, the browser became much more capable, and so people started to move the logic that would generate content from the server to the browser. Instead of sending a whole styled HTML page, a web server could just send the data needed to create it. Then, code could run on the browser to actually turn that data into HTML. That browser code could also update what the user would see, making just the required data calls.
So, in the early to mid 2010s, front-end code would typically:
- render complex web pages from data retrieved from back-end,
- simulate “navigation” between different views: when the user would do some actions, the entire page would change, the url would update etc. but without actually loading a new page from the server.
- maintain the state of an application: the application could track certain things about the user and the session, and won’t have to reload that information from the server all the time.
- dynamically update both contents and style of a web page.
Now, all of this is possible to do in “vanilla javascript”. But it’s really cumbersome to implement it, and especially tricky to do it in a performant way. There are millions and millions of “web apps” that are replacing the static “web sites” of old, and which all need to dynamically render content. Should developers reimplement that from scratch each time?
Enter the web frameworks such as React. These frameworks are abstractions that let the developers focus on the logic of their web app (where the data comes from, how content is organized) without being tied to the nitty gritty. Web frameworks make developers organize their code in building blocks called modules or components. Somebody could write a header component and someone else building a page could reuse that header component. And a third developer could change the header component, and that change would be reflected everywhere the component is used. Folks could also build 3rd party libraries compatible with the web framework ecosystem, that would address common problems that many developers face. For instance, someone could create a date picker component (a notably tricky interface) that anyone can reuse and customize. Or create a solution to deal with very long pages by only rendering what is in the browser viewport, and creating/deleting elements as a user would scroll.
To have the support of this ecosystem is a huge productivity boost. There are millions of developers who work with React, and the most popular React libraries are very elegant solutions to hard problems(the same could be said of Angular, Vue etc. though their communities are a bit smaller).
React and web frameworks aren’t exactly needed, in fact there is a reverse trend in the last couple of years to go back to server generated content in some cases or to only use vanilla javascript, but it’s a very solid foundation to build a web app.

Comments:
1- The specific rationale for React is state management and efficient page updates, it’s underlying power comes not just from the structure and tooling provided by it being a framework, but also the shadow-DOM and component lifecycle that along with state management empower greater interactivity without very slow inefficient page updates.
2- React isn’t needed, but it is a great framework that can reduce the amount of work you do in making a website/webapp.
React is great for widgets and implementing patterns. You can keep data/text separate from structure and behavior. React, angular and vue are all popular frameworks. Before that we used stuff like dust, handlebars, jQuery and UI libraries like dojo and jQuery UI.
Developers are always looking for ways to be more efficient and more maintainable. React is a current iteration tool for being more efficient.
3- It is needed as a pattern for the devs to create packages that will works (The React packages). In NPM there are many packages, but all them are following its own logic, docs or no docs, they are based on another packages, etc. With things like React, you are somehow limited to follow its rules and you are entering its ecosystem which is good. This is true for all frameworks/libraries.
React also has some configurations which follows the best practices (create-react-app, NextJS, etc), but this is the same and for others.
The difference is that React is close to JS and there is a lot of freedom, what to use like a package, starter pack, use or not Typescript.
- How can I get the delete button to go on the same line as its corresponding list item?by /u/Jolly_Blackberry_989 (React – A JavaScript library for building user interfaces) on September 26, 2023 at 12:04 pm
<span style={{display:'flex', justifyContent: 'center'}}> <ul> {list.map((item, index) => ( <li style={{listStyle:'none', display:'flex', marginLeft:'45vw', marginRight:'55vw', marginTop:'15px', marginBottom:'10px', color:'white', fontSize:'2.5vw', font:'roboto', boxSizing:'border-box', width:'40vw', lineHeight:'0.6', textAlign:'center', display:'inline-block', flex:1 }} key={index}> {item} <button name='delete' style={{ textAlign:'center', marginLeft: '42vw', marginRight:'55vw', color:'white', fontSize: '12px', display:'inline', backgroundColor:'gold', background:'transparent', fontSize:'2vw' }} onClick={() => deleteItem(index)}>Complete</button> </li>))} </ul> </span> submitted by /u/Jolly_Blackberry_989 [link] [comments]
- I am getting this error... while doing npx . can anyone pls helpby /u/batsy_123 (React Native - Learn once, write anywhere.) on September 26, 2023 at 11:35 am
submitted by /u/batsy_123 [link] [comments]
- I love React Nativeby /u/kunand (React – A JavaScript library for building user interfaces) on September 26, 2023 at 10:59 am
submitted by /u/kunand [link] [comments]
- Should I start learning react from 'code with harry' (which is outdated) or from 'freecodecamp'?by /u/SAL_TENTACION (React – A JavaScript library for building user interfaces) on September 26, 2023 at 10:52 am
submitted by /u/SAL_TENTACION [link] [comments]
- Problem with using react-i18next and mui/material in a packageby /u/Rebel_Johnny (React – A JavaScript library for building user interfaces) on September 26, 2023 at 7:26 am
Hello Reddit. I've made an npm package with various components as a personal project. There is a problem with one of the components in my package, which is basically an mui/Autocomplete component which I've specified some of its props for. some of these props includes direction which is taken from react-i18next package. Something like this: import Autocomplete from "@mui/material/Autocomplete" import { useTranslation } from "react-i18next"; const { t, i18n } = useTranslation() <Autocomplete componentsProps={{ paper: { sx: { width: { width }, maxWidth: '90vw', direction: i18n.dir(), position: "absolute", fontSize: { fontSize }, right: i18n.dir() === "rtl" ? "0" : "unset" } } }} . . . noOptionsText={t("اطلاعات یافت نشد")} /> basically, I am trying to use t and i18n here. the problem is that t and i18n both become undefined when used in an nx monorepo with react. I am using nx because I am trying to make a microUI pattern. I also get a warning : react-i18next:: You will need to pass in an i18next instance by using initReactI18next this is while I have already initialized react-i18next, and the whole thing had no problems before moving to nx. The package I made (just in case) is named react-input-grid, which has problems when using the GHAutocomplete tag I made. submitted by /u/Rebel_Johnny [link] [comments]
- ABC Logic Puzzle: Engage Your Brain with the Ultimate Puzzle Gameby /u/mustafadalga (React – A JavaScript library for building user interfaces) on September 26, 2023 at 7:14 am
During my university's mind games lesson, we played the "ABC Logic Puzzle" on paper and I decided to digitize it with next.js as a open source game. Source: https://github.com/mustafadalga/abc-logic-puzzle https://preview.redd.it/ai02hi54wjqb1.png?width=1272&format=png&auto=webp&s=8de0b61f261ca95e17e70e37d95fb7515892511e submitted by /u/mustafadalga [link] [comments]
- Hi guys, I am working on an expo project, it has android and ios folders as well. I am confused now, can I make builds by those folders as well?by /u/AbdulAhad420420 (React Native - Learn once, write anywhere.) on September 26, 2023 at 6:42 am
submitted by /u/AbdulAhad420420 [link] [comments]
- React native design patternsby /u/Embarrassed_Neat_702 (React Native - Learn once, write anywhere.) on September 26, 2023 at 5:26 am
i have been doing some study on react native design patterns and id like to know your opinion, using redux or mobx with API calling what kind of structure you use in a big scale project, what design pattern you use, why and how its different from standard code. It'd be great if you can provide. thanks in adv... submitted by /u/Embarrassed_Neat_702 [link] [comments]
- Help with react-beautiful-dndby /u/MateoMTr1 (React – A JavaScript library for building user interfaces) on September 26, 2023 at 5:25 am
Ive tried everything in every forum i couldve tried, chatgpt, bard, but nothing seems to work i have the : Connect(Droppable): Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead. A setup problem was encountered.> Invariant failed: provided.innerRef has not been provided with a HTMLElement. errors and I cant fix them, this is the code import {Droppable} from "react-beautiful-dnd"; import {Celda} from "@/app/FormMaterias/Components/Celda"; export const Columna = ({Dia, Horarios}) => { return ( <div *className*={'Columna'} > <div> <p>{Dia.titulo}</p> </div> <Droppable *droppableId*={*Dia*.id} > {(provided) => { <div *ref*={*provided*.innerRef} {...*provided*.droppableProps}> {Horarios.map(horario => {<div *key*={*horario*.id} ><Celda *Contenido*={*horario*}/></div> })} {provided.placeholder} </div> }} </Droppable> </div> )} submitted by /u/MateoMTr1 [link] [comments]
- Expo usage from a pricing perspective?by /u/rayraysunrise (React Native - Learn once, write anywhere.) on September 26, 2023 at 4:53 am
Ok I'm picking up react native again after being away from the ecosystem for 4 yrs. Naturally that means I come from a era where expo was just not good. Problem is everyone recommended back then and now everyone is still doing that. Only difference is expo actually looks like its improved... a lot. Ease of use, deployments, ease of maintenance and actually being able to integrate native code all sounds wonderful. But i am not understanding this pricing scheme. I'm paying for updates I push to my applications after 1000 users? Bonus question is this like a firebase solution thats going to trap me into an ecosystem? Firebase is all fine and dandy until you have to migrate services. submitted by /u/rayraysunrise [link] [comments]
Smartphone 101 - Pick a smartphone for me - android or iOS - Apple iPhone or Samsung Galaxy or Huawei or Xaomi or Google Pixel
Can AI Really Predict Lottery Results? We Asked an Expert.


Djamgatech

Read Photos and PDFs Aloud for me iOS
Read Photos and PDFs Aloud for me android
Read Photos and PDFs Aloud For me Windows 10/11
Read Photos and PDFs Aloud For Amazon
Get 20% off Google Workspace (Google Meet) Business Plan (AMERICAS): M9HNXHX3WC9H7YE (Email us for more)
Get 20% off Google Google Workspace (Google Meet) Standard Plan with the following codes: 96DRHDRA9J7GTN6 (Email us for more))
FREE 10000+ Quiz Trivia and and Brain Teasers for All Topics including Cloud Computing, General Knowledge, History, Television, Music, Art, Science, Movies, Films, US History, Soccer Football, World Cup, Data Science, Machine Learning, Geography, etc....

List of Freely available programming books - What is the single most influential book every Programmers should read
- Bjarne Stroustrup - The C++ Programming Language
- Brian W. Kernighan, Rob Pike - The Practice of Programming
- Donald Knuth - The Art of Computer Programming
- Ellen Ullman - Close to the Machine
- Ellis Horowitz - Fundamentals of Computer Algorithms
- Eric Raymond - The Art of Unix Programming
- Gerald M. Weinberg - The Psychology of Computer Programming
- James Gosling - The Java Programming Language
- Joel Spolsky - The Best Software Writing I
- Keith Curtis - After the Software Wars
- Richard M. Stallman - Free Software, Free Society
- Richard P. Gabriel - Patterns of Software
- Richard P. Gabriel - Innovation Happens Elsewhere
- Code Complete (2nd edition) by Steve McConnell
- The Pragmatic Programmer
- Structure and Interpretation of Computer Programs
- The C Programming Language by Kernighan and Ritchie
- Introduction to Algorithms by Cormen, Leiserson, Rivest & Stein
- Design Patterns by the Gang of Four
- Refactoring: Improving the Design of Existing Code
- The Mythical Man Month
- The Art of Computer Programming by Donald Knuth
- Compilers: Principles, Techniques and Tools by Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman
- Gödel, Escher, Bach by Douglas Hofstadter
- Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin
- Effective C++
- More Effective C++
- CODE by Charles Petzold
- Programming Pearls by Jon Bentley
- Working Effectively with Legacy Code by Michael C. Feathers
- Peopleware by Demarco and Lister
- Coders at Work by Peter Seibel
- Surely You're Joking, Mr. Feynman!
- Effective Java 2nd edition
- Patterns of Enterprise Application Architecture by Martin Fowler
- The Little Schemer
- The Seasoned Schemer
- Why's (Poignant) Guide to Ruby
- The Inmates Are Running The Asylum: Why High Tech Products Drive Us Crazy and How to Restore the Sanity
- The Art of Unix Programming
- Test-Driven Development: By Example by Kent Beck
- Practices of an Agile Developer
- Don't Make Me Think
- Agile Software Development, Principles, Patterns, and Practices by Robert C. Martin
- Domain Driven Designs by Eric Evans
- The Design of Everyday Things by Donald Norman
- Modern C++ Design by Andrei Alexandrescu
- Best Software Writing I by Joel Spolsky
- The Practice of Programming by Kernighan and Pike
- Pragmatic Thinking and Learning: Refactor Your Wetware by Andy Hunt
- Software Estimation: Demystifying the Black Art by Steve McConnel
- The Passionate Programmer (My Job Went To India) by Chad Fowler
- Hackers: Heroes of the Computer Revolution
- Algorithms + Data Structures = Programs
- Writing Solid Code
- JavaScript - The Good Parts
- Getting Real by 37 Signals
- Foundations of Programming by Karl Seguin
- Computer Graphics: Principles and Practice in C (2nd Edition)
- Thinking in Java by Bruce Eckel
- The Elements of Computing Systems
- Refactoring to Patterns by Joshua Kerievsky
- Modern Operating Systems by Andrew S. Tanenbaum
- The Annotated Turing
- Things That Make Us Smart by Donald Norman
- The Timeless Way of Building by Christopher Alexander
- The Deadline: A Novel About Project Management by Tom DeMarco
- The C++ Programming Language (3rd edition) by Stroustrup
- Patterns of Enterprise Application Architecture
- Computer Systems - A Programmer's Perspective
- Agile Principles, Patterns, and Practices in C# by Robert C. Martin
- Growing Object-Oriented Software, Guided by Tests
- Framework Design Guidelines by Brad Abrams
- Object Thinking by Dr. David West
- Advanced Programming in the UNIX Environment by W. Richard Stevens
- Hackers and Painters: Big Ideas from the Computer Age
- The Soul of a New Machine by Tracy Kidder
- CLR via C# by Jeffrey Richter
- The Timeless Way of Building by Christopher Alexander
- Design Patterns in C# by Steve Metsker
- Alice in Wonderland by Lewis Carol
- Zen and the Art of Motorcycle Maintenance by Robert M. Pirsig
- About Face - The Essentials of Interaction Design
- Here Comes Everybody: The Power of Organizing Without Organizations by Clay Shirky
- The Tao of Programming
- Computational Beauty of Nature
- Writing Solid Code by Steve Maguire
- Philip and Alex's Guide to Web Publishing
- Object-Oriented Analysis and Design with Applications by Grady Booch
- Effective Java by Joshua Bloch
- Computability by N. J. Cutland
- Masterminds of Programming
- The Tao Te Ching
- The Productive Programmer
- The Art of Deception by Kevin Mitnick
- The Career Programmer: Guerilla Tactics for an Imperfect World by Christopher Duncan
- Paradigms of Artificial Intelligence Programming: Case studies in Common Lisp
- Masters of Doom
- Pragmatic Unit Testing in C# with NUnit by Andy Hunt and Dave Thomas with Matt Hargett
- How To Solve It by George Polya
- The Alchemist by Paulo Coelho
- Smalltalk-80: The Language and its Implementation
- Writing Secure Code (2nd Edition) by Michael Howard
- Introduction to Functional Programming by Philip Wadler and Richard Bird
- No Bugs! by David Thielen
- Rework by Jason Freid and DHH
- JUnit in Action
#BlackOwned #BlackEntrepreneurs #BlackBuniness #AWSCertified #AWSCloudPractitioner #AWSCertification #AWSCLF-C01 #CloudComputing #AWSStudyGuide #AWSTraining #AWSCareer #AWSExamPrep #AWSCommunity #AWSEducation #AWSBasics #AWSCertified #AWSMachineLearning #AWSCertification #AWSSpecialty #MachineLearning #AWSStudyGuide #CloudComputing #DataScience #AWSCertified #AWSSolutionsArchitect #AWSArchitectAssociate #AWSCertification #AWSStudyGuide #CloudComputing #AWSArchitecture #AWSTraining #AWSCareer #AWSExamPrep #AWSCommunity #AWSEducation #AzureFundamentals #AZ900 #MicrosoftAzure #ITCertification #CertificationPrep #StudyMaterials #TechLearning #MicrosoftCertified #AzureCertification #TechBooks