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.
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.
Read about our process of bringing New Architecture to the New Expensify App, and what we had to do to achieve it (spoiler: A LOT)Continue reading on Software Mansion »
Hi Friends, today I bring you a complete tutorial to learn React for absolute beginners. I explain all React concepts in detail and with…Continue reading on codeburst »
Hey there, fellow learner! Welcome to the exciting world of Redux Toolkit. In this first part of our journey, we’re going to explore how…Continue reading on Medium »
Si estas buscando un articulo donde aprender a integrar compras en tu app de react native, has llegado a la publicación correcta…Continue reading on Ract Native con Expo »
Design systems have become indispensable assets for businesses striving to maintain consistency and efficiency while expanding their…Continue reading on Medium »
Hey everyone, welcome back! Today, I’m thrilled to take you through the process of building a live streaming app using ZEGOCLOUD.Continue reading on Medium »
submitted by /u/EmphasisCheap8611 [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.
submitted by /u/Desperate_Dirt_3041 [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.
Between-jobs Jose has always been different to in-work Jose. Much less stressed, bursting with ideas and watching a lot of football on television. submitted by /u/kundu123 [link] [comments]
As Weis said: “I consider this boy a great player as much as he is a dirty guy. I hate him for the things that he did. I think he doesn’t have any respect for France and also for all the people who are asking for a French passport and don’t get it. And under the pretext that he is a great athlete, he got it. I find it scandalous, I find it embarrassing. I don’t care about his excuses, cause they are his words, and his words mean nothing”. submitted by /u/kundu123 [link] [comments]