Niflheim World

Welcome to Niflheim !

  • First 5 messages from new users (pre-moderated user) will be checked for flood/spam before being posted on the forum. Users will also be checked for a multi-account.
    If you want to communicate without delay, get a free Huscarl status (how to get - User Groups), or buy premium status (how to buy - Premium status)

Programming React for Real Front-End Code, Untangled. L. Fischer


Redman

Forumteam
Staff member
Tignarman
Joined
Aug 24, 2020
Messages
17,661
Reaction score
22,984
NL COIN
89,416
1604852171180.png
Many web applications allow users to browse and edit content without reloading the page—for example, editing a document, selecting people to email from a contact list, or even browsing a list of events and buying a ticket. While web pages used to be just about the display of information, now a fair amount of business logic might run in the browser. To handle this logic, you often create specialized code—the data model for your application.

In all these applications, you must update the user interface and data model consistently. Since every web page is a tree of elements, called the DOM, you could apply a change directly to the DOM on every action, but this makes it difficult to distinguish business logic from visual adjustments. When you make visual adjustments, you manipulate DOM elements to change the appearance of the user interface. That’s why web developers have started to prefer to store the data in a separate data structure, like a JavaScript object. But now you have a new problem: you need to communicate the changes from the data structure to the DOM and back.

You could add DOM elements with native browser functions such as appendChild and change element contents by overwriting the innerHTML attribute on DOM nodes. This forces you to spend time on boilerplate code, away from your application’s core logic. Since this boilerplate turns out similarly across different web applications, it makes sense to offload DOM manipulation to a library.

React is a JavaScript library that automatically updates the DOM when the data changes. It makes writing highly interactive web pages faster and more reliable. It’s easy to use and integrates with a wealth of techniques and other libraries
In this book, you’ll learn the fundamentals of building user interfaces with React and how to prepare an application for production so that it loads efficiently. You’ll also test components, use React with the Redux library for more complex applications, and work with other libraries. You’ll get hands-on practice as you work through complete examples.

 
shape1
shape2
shape3
shape4
shape7
shape8
Top