AI Dashboard is available on the Web, Apple, Google, and Microsoft, PRO version
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.
Get 20% off Google Google Workspace (Google Meet) Standard Plan withΒ the following codes: 96DRHDRA9J7GTN6
Get 20% off Google Workspace (Google Meet) Business Plan (AMERICAS):Β M9HNXHX3WC9H7YE (Email us for more codes)
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.
- Issues with displaying MUI snackbars using useSnackbar from Notistackby /u/hesh_saih (React β A JavaScript library for building user interfaces) on May 3, 2024 at 9:15 pm
Hi, I'm developing an app and I've found a way of displaying MUI's snackbars using Notistack's useSnackbar hook. I've created a hook like so: const useNotification = () => { const [notification, setNotification] = useState<NotificationType | null>(null); const {enqueueSnackbar, closeSnackbar} = useSnackbar(); const action = () => ( <Fragment> <IconButton onClick={() => { closeSnackbar() }}> <CloseIcon/> </IconButton> </Fragment> ); useEffect(()=>{ if (notification){ enqueueSnackbar(notification.description, { variant: notification.type, autoHideDuration: 5000, action }); } },[notification]); return setNotification; } and when I want to display a snackbar I just do: const sendNotification = useNotification(); ... sendNotification({ description: "Signing in failed :(", type: "error" }); which works perfectly fine, but for some unknown reason to me it fails to work after awaiting an async function. For an example, I have a function for logging in, which looks like so: const logIn = async (formData: AccountLoginType) => { try { setIsLogging(true); const { data } = await api.logIn(formData); setToken(data); navigate(Pathnames.public.home); sendNotification({ type: "success", description: "Successfully logged in!" }); } catch (e) { console.error(e); sendNotification({ type: "error", description: "Failed to log in :(" }); return e; } finally { setIsLogging(false); } } api.logIn() function looks like this: export const api = { ... logIn: (formData: AccountLoginType): ApiResponseType<string> => apiForAnon.post("/auth/authenticate", formData), ... } Whenever the api.logIn() fails, the catch block is executed and the error snackbar is displayed as expected, but when it doesn't, then the success snackbar is not displayed. The rest of the code after the await also works fine, but it seems like the setter, which I'm returning from the hook, doesn't do anything after the awaited function. What can be the issue and how can I possibly fix it? If some more context to the code is required, I'll provide it. Thanks in advance and have a great day! submitted by /u/hesh_saih [link] [comments]
- Mastering React: React Crash Course With Mini Projects | Free Udemy Course for limited Timeby /u/Ordinary_Craft (React β A JavaScript library for building user interfaces) on May 3, 2024 at 8:07 pm
submitted by /u/Ordinary_Craft [link] [comments]
- 5 Free Tools to Boost Developer Productivityby Ahmed Onour (React on Medium) on May 3, 2024 at 6:46 pm
Continue reading on Medium Β»
- React Nativeβde BileΕenler(Components)by Ali YILMAZ (Reactnative on Medium) on May 3, 2024 at 6:45 pm
Hepinize selamlar! React Native ile ilgili genelden ΓΆzele yolculuΔumuza bu iΓ§erik ile devam ediyoruz. Bir ΓΆnceki makalemiz βReact Nativeβ¦Continue reading on Medium Β»
- Quick Cash Loan Customer Care Helpline NumberβοΈβ»βΈβΏβΏβΆβΎβ·β·β½βΈ//βοΈ 7864967058 // 63OO192283 ββ/ contactβ¦by Quick Cash Loan App (React on Medium) on May 3, 2024 at 6:03 pm
Continue reading on Medium Β»
- Best way to learn micro interactions and animations?by /u/KnackOfAbhi (React Native - Learn once, write anywhere.) on May 3, 2024 at 6:00 pm
Basically the title submitted by /u/KnackOfAbhi [link] [comments]
- As a Frontend Developer, How Much Backend Should We Know?by /u/Maleficent_Fennel883 (React β A JavaScript library for building user interfaces) on May 3, 2024 at 5:57 pm
Hi! The reason behind my question is that I work for a service-based company. Last month, both my colleague and I were interviewed for a position requiring knowledge of Remix and hiring for a frontend role. My colleague was selected, but when they began working on the project, they struggled to keep up due to the extensive backend interactions and concepts. As a result, they replaced them with me after a re-interview, which included a live task completion section. So, my question is, nowadays, many frontend frameworks like Next, Remix, Qwik, etc., are full-stack frameworks. How much backend knowledge is necessary to handle these frameworks effectively, and what specifically do we need to know to understand them better? submitted by /u/Maleficent_Fennel883 [link] [comments]
- Need to learn react from rootby /u/Hopeful_Key_6647 (React β A JavaScript library for building user interfaces) on May 3, 2024 at 5:52 pm
i am backend developer with django now i am trying to do frontend with React.need suggestions of platform or youtube videos in depth knowledge submitted by /u/Hopeful_Key_6647 [link] [comments]
- Baby Reindeer: A Rollercoaster of Emotionsby Mariam Aljneibi (React on Medium) on May 3, 2024 at 5:47 pm
Photo by Mika Baumeister on UnsplashContinue reading on Medium Β»
- React: How to Use the Star Wars API for Beginnersby Michael Jude Larocca (React on Medium) on May 3, 2024 at 5:42 pm
May the 4th be with you! In this article, to celebrate Star Wars Day, I learned and stepped through the process of using the Star Wars APIβ¦Continue reading on Towards Dev Β»
Active Hydrating Toner, Anti-Aging Replenishing Advanced Face Moisturizer, with Vitamins A, C, E & Natural Botanicals to Promote Skin Balance & Collagen Production, 6.7 Fl Oz
Age Defying 0.3% Retinol Serum, Anti-Aging Dark Spot Remover for Face, Fine Lines & Wrinkle Pore Minimizer, with Vitamin E & Natural Botanicals
Firming Moisturizer, Advanced Hydrating Facial Replenishing Cream, with Hyaluronic Acid, Resveratrol & Natural Botanicals to Restore Skin's Strength, Radiance, and Resilience, 1.75 Oz
Skin Stem Cell Serum
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 #AWSCLFC02 #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
Top 1000 Canada Quiz and trivia: CANADA CITIZENSHIP TEST- HISTORY - GEOGRAPHY - GOVERNMENT- CULTURE - PEOPLE - LANGUAGES - TRAVEL - WILDLIFE - HOCKEY - TOURISM - SCENERIES - ARTS - DATA VISUALIZATION
Top 1000 Africa Quiz and trivia: HISTORY - GEOGRAPHY - WILDLIFE - CULTURE - PEOPLE - LANGUAGES - TRAVEL - TOURISM - SCENERIES - ARTS - DATA VISUALIZATION
Exploring the Pros and Cons of Visiting All Provinces and Territories in Canada.
Exploring the Advantages and Disadvantages of Visiting All 50 States in the USA
Health Health, a science-based community to discuss health news and the coronavirus (COVID-19) pandemic
- Found: the dial in the brain that controls the immune systemby /u/barweis on May 3, 2024 at 3:18 pm
submitted by /u/barweis [link] [comments]
- Long Beach health officials declare tuberculosis outbreak a public health emergencyby /u/josh252 on May 3, 2024 at 11:26 am
submitted by /u/josh252 [link] [comments]
- Why does TB have such a hold on the Inuit communities of the Canadian Arctic?by /u/Maxcactus on May 3, 2024 at 10:11 am
submitted by /u/Maxcactus [link] [comments]
- Launching an effective bird flu vaccine quickly could be tough, scientists warnby /u/Maxcactus on May 3, 2024 at 10:01 am
submitted by /u/Maxcactus [link] [comments]
- What are the most frequent and serious causes of child poisoning?by /u/euronews-english on May 3, 2024 at 9:43 am
submitted by /u/euronews-english [link] [comments]
Today I Learned (TIL) You learn something new every day; what did you learn today? Submit interesting and specific facts about something that you just found out here.
- TIL John Walsh, host of "America's Most Wanted," became an advocate for missing children after his son Adam was abducted and murdered in 1981. His advocacy led to changes in laws and the creation of the National Center for Missing & Exploited Children. His show helped capture over 1,200 fugitives.by /u/whstlngisnvrenf on May 3, 2024 at 2:00 pm
submitted by /u/whstlngisnvrenf [link] [comments]
- TIL - Computers were people (mostly women) up until WWII. Teams of people, often women from the late nineteenth century onwards, were used to undertake long and often tedious calculations.by /u/MyHamburgerLovesMe on May 3, 2024 at 1:44 pm
submitted by /u/MyHamburgerLovesMe [link] [comments]
- TIL when a peanut plant is pollinated, the flower loses its petals. The bare flower bud hangs from the stem and grows down toward the ground until it penetrates the soil. Once it reaches the appropriate depth, it becomes a peanutby /u/admiralturtleship on May 3, 2024 at 1:38 pm
submitted by /u/admiralturtleship [link] [comments]
- TIL that 3% of people in the US will have a psychotic break at some point in their livesby /u/Just_Want_To_Write on May 3, 2024 at 1:08 pm
submitted by /u/Just_Want_To_Write [link] [comments]
- TIL Most of the stories about the Dvorak keyboard being superior to the standard QWERTY come from a Navy study conducted by August Dvorak, who owned the patent on the Dvorak keyoard.by /u/littletoyboat on May 3, 2024 at 11:00 am
submitted by /u/littletoyboat [link] [comments]
Reddit Science This community is a place to share and discuss new scientific research. Read about the latest advances in astronomy, biology, medicine, physics, social science, and more. Find and submit new publications and popular science coverage of current research.
- Researchers identify 2 monoclonal antibodies against Nipah virus through phage display. As there are no immunotherapies against this virus, these findings could assist in the development of antiviral drugs and vaccine design.by /u/Biointron on May 3, 2024 at 3:43 pm
submitted by /u/Biointron [link] [comments]
- Texas dairy farm worker's case may be first where H5N1 bird flu virus spread from mammal to human according to a new report by the CDC. All previous human cases were linked to transmission from infected birds.by /u/shiruken on May 3, 2024 at 3:11 pm
submitted by /u/shiruken [link] [comments]
- The environmental sustainability of digital content consumptionby /u/mvdm_42 on May 3, 2024 at 2:56 pm
submitted by /u/mvdm_42 [link] [comments]
- Transparent filter with 10,000-pixel power turns phone into pro camera | The study utilizes a transparent, one-centimeter-square plane featuring a 2D semiconductorβa thin film composed of only a few atoms.by /u/chrisdh79 on May 3, 2024 at 2:31 pm
submitted by /u/chrisdh79 [link] [comments]
- Only half of studies in 5 leading journals of animal behavior research report using techniques to avoid observer bias from sneaking in β but thatβs up from under 20% in study 8 years earlierby /u/globehater on May 3, 2024 at 1:08 pm
submitted by /u/globehater [link] [comments]
Reddit Sports Sports News and Highlights from the NFL, NBA, NHL, MLB, MLS, and leagues around the world.
- Chevrolet denies participation in Team Penske's IndyCar cheating scandalby /u/Oldtimer_2 on May 3, 2024 at 3:49 pm
submitted by /u/Oldtimer_2 [link] [comments]
- Larry Demeritte is just the second Black trainer since 1951 to saddle a horse for the Kentucky Derbyby /u/Oldtimer_2 on May 3, 2024 at 3:48 pm
submitted by /u/Oldtimer_2 [link] [comments]
- Buffalo Bills sign WR Chase Claypool to a one year contractby /u/Oldtimer_2 on May 3, 2024 at 3:43 pm
submitted by /u/Oldtimer_2 [link] [comments]
- Report: Beckham to sign 1-year deal with Dolphinsby /u/SpiritedSuccess5675 on May 3, 2024 at 3:30 pm
submitted by /u/SpiritedSuccess5675 [link] [comments]
- Verstappen says future is with Red Bull, suggests β¬250M not enough to switch. [$275M US]by /u/Oldtimer_2 on May 3, 2024 at 3:20 pm
submitted by /u/Oldtimer_2 [link] [comments]