Learn React 18 Beta - 1learned from https://egghead.io/courses/migrate-a-client-side-application-to-react-18-beta-9379f0d1 Install # npm install react@rc react-dom@rc The new way to create Dom const root = document.getElementById("root") ReactDOM.createRoot(root).render(<A...Mar 12, 2022 · 1 min readhaorong.hashnode.dev
Should I Handle Form Validation on Front or Backend?I was asked this question in an interview. My answer was both are necessary because my experience uses Node.js to build the backend. It has to make sure that the user sent the right type of data. For the front end, Validation can give some hints if t...Jun 22, 2021 · 1 min readhaorong.hashnode.dev
#100DAYSOFCODE Day100Intermediate React Interview # Demo Code 1: fetch Data const [fetchData, setFetchData] = React.useState(null) React.useEffect(() => { fetch("https://randomuser.me/api/?results=20") .then((response) => response.json()) .then((re...Jun 11, 2021 · 2 min readhaorong.hashnode.dev
#100DAYSOFCODE Day99Review and Explore Node.js Node Globals: __dirname __filename global os, fs , http don't need install: const os = require("os") // system info const fs = require("fs") // files management const http = require("http") console.log(os.platform(), ...Jun 10, 2021 · 1 min readhaorong.hashnode.dev
#100DAYSOFCODE Day98Learn about TypeScript Types by Inference # let helloWorld = "Hello World"; Defining Types You can explicitly describe this object’s shape using an interface declaration: interface User { name: string; id: number; } const user: User = { name: ...Jun 9, 2021 · 1 min readhaorong.hashnode.dev