Modern Full-Stack Development


The REAL Starting Point: main.tsx



Download 5,64 Mb.
Pdf ko'rish
bet70/107
Sana06.08.2021
Hajmi5,64 Mb.
#140576
1   ...   66   67   68   69   70   71   72   73   ...   107
Bog'liq
Modern Full-Stack Development Using TypeScript, React, Node

 The REAL Starting Point: main.tsx
We begin in the main.tsx file, with a few imports:
import "normalize.css";
import "../css/main.css";
As with MailBag, we want a clean slate as far as styles go, so normalize.css is 
brought in. Then, our application-specific stylesheet, main.css, is likewise imported. 
There aren’t many style definitions in that file, but I’ll introduce pieces of it as we 
encounter the style classes throughout the rest of the code.
After that, React is imported:
import React from "react";
import ReactDOM from "react-dom";
Finally, the BaseLayout component is as well. This will be the component at the top 
of the component hierarchy that will contain state for all the child components:
import BaseLayout from "./components/BaseLayout";
And, once that’s all imported, it’s time to render us an interface:
ReactDOM.render(, document.body);
At this point in app execution, you’d have the basic screen up, though the playboard 
is initially hidden (unless you are the second player to connect to the server), so it’s 
mostly an empty screen. Still, it’s a start!
Now, let’s see what that BaseLayout component has in store for us.

Download 5,64 Mb.

Do'stlaringiz bilan baham:
1   ...   66   67   68   69   70   71   72   73   ...   107




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish