Saturday, August 28, 2021

Addition

 The main use of React.js for an 'eternal beginner' like me, 

might just be to be able to put together one page user interfaces

using the latest javascript technologies. Because not all browsers - 

older browsers - can process things like arrow functions and so forth. 

But react is more than that: it brings together the largest set of

javascript ready-made code components,  covering a wide array

of problems. 


It was initially put together at Facebook, in order to allow

different coders to mess with the facebook interface for the user, but just 

enough. From the poiint of view of coders themselves, they needed to 

not create confusion while doing things like translating to a myriad of languages 

and number presentations. React is now in the public domain. since 2017.


There are three components to basic React: the code functions such as state, 

component, properties (input), element(what should appear). Xjs for data handling 

(a form of XML). And Babel, which creates a virtual DOM with only certain festures 

up for update at any point.The CS50 project I followed references those three in the head 

section of the Html pageAt the very end of the code: a call to render the DOM.


The project itself is sweet: it is an addition game where user needs to accumulate 10

conscutive correct answers to 'win'. Below:


Note the frequent use of 'state'. This is the update call.








No comments: