Many modern web applications use a JavaScript library called React to build user interfaces. Developers like to use React because it can efficiently update your webpage when the data changes. For example, if someone adds a comment on an Instagram post that you're looking at, React can render the new comment without having to re-render everything else on the page.
that walks you through the fundamentals of React while building a tic-tac-toe game.
Express
One difference between the website you built today and websites like Gmail and Instagram is that your website is static, but Gmail and Instagram are dynamic. Everyone who visits your website will see the exact same thing, but different users will see different things when they are logged into Gmail or Instagram.
Dynamic websites deliver customized information based on the user who is logged in.
Here is a basic explanation:
When you log into a website, your browser sends your account details to the website's server (some computer somewhere else in the world that hosts the website code).
If your login information is correct, the server sends a token back to your browser that uniquely identifies you as a user.
Then, your browser will include that token every time it asks for a Gmail or Instagram web page so that the website server knows whose information to display.
The server has a bunch of static templates built using HTML, CSS, and JavaScript (e.g. there's one template for an Instagram feed). Based on the user who is logged in, the server will populate the template with the correct information and send the code for the full web page back to the browser.
🍦Challenge: Explore Express
Express is a popular framework for server-side programming using JavaScript. The
might be too much for your first day of programming, but it's good to know what exists on the horizon. Feel free to poke around just to see what's there 🙂