ReactJS? ?? ??? ????? ??? ?? ???? ?? ?? JavaScript ????????. ??? ??????? ???? ?? ?? ???? ????? ?? ?? ??? ????? ???? ???? ??? ???? ?? ??????. ??? ???? ?? ??? ??? React ??? ???? ? ??? ?? ? ?? ?? ?????.
- ???? ?? ?? ??? ?? ??? ???? ??? ??? ?? ??? ?? ?? ? ????. ???? ??? ? ??? ?? ??? ?? "?? ??" ?? ??? ????.
src/ ├── components/ │ └── Button/ │ ├── Button.js │ ├── Button.css │ └── index.js ├── pages/ │ └── Home.js └── App.js
????? ??(?? ??)?? ???? ?????? ?? ????? ???? ?? ????? ? ?????.
- ??? ?? ?? ? ?? ?? React Hooks? ?? ?? ??? ?? ??? ????? ??? ???? ??? ??? ???????. ??? ?? ??? ????? ? ??, ?? ??, ????? ????.
?:
// Instead of class component: class MyComponent extends React.Component { state = { count: 0 }; increment = () => { this.setState({ count: this.state.count + 1 }); }; render() { return <button onClick={this.increment}>{this.state.count}</button>; } } // Use functional component with hooks: import React, { useState } from 'react'; function MyComponent() { const [count, setCount] = useState(0); return <button onClick={() => setCount(count + 1)}>{count}</button>; }
???? ??
?? ????? ?? ?? ? ???? ?????. ?? ?? ??? ???? ?? ??? ?? ??? ??? ?? ??? ???. ?? ??? ?? ??? ???? ?? ? ?? ?? ?? ??? ??? ?? ????.PropType ?? TypeScript ??
React? PropTypes ?? TypeScript? ?? ???? ?? ??? ??? ???? ? ??? ? ? ????. ???? ?? ??? ???? ?? ??? ? ?? ??? ? ?? ??? ??? ???? ?????.
PropType? ?:
import PropTypes from 'prop-types'; function Greeting({ name }) { return <h1>Hello, {name}</h1>; } Greeting.propTypes = { name: PropTypes.string.isRequired, };
TypeScript? ?:
type GreetingProps = { name: string; }; const Greeting: React.FC<GreetingProps> = ({ name }) => { return <h1>Hello, {name}</h1>; };
- ???? ??? UI? ??? ?? ??? ???? ??? ???? ????? ??? ??????? ?????. ?? ?? ??? ?? ??? ???? ??? ???? ??? ??? ?? ???? UI? ???? ?? ??? ???? ?????.
?? ??? ?:
import { useState, useEffect } from 'react'; function useFetchData(url) { const [data, setData] = useState(null); useEffect(() => { fetch(url) .then(response => response.json()) .then(data => setData(data)); }, [url]); return data; } // UI Component: function DataDisplay({ url }) { const data = useFetchData(url); return <div>{data ? data.title : 'Loading...'}</div>; }
- ?? ?? ??? ?? ?? ??? ?? ??? ???? ??? ? ?? ?? ? ????. ??? ???? camelCase?, ?? ?? ???? PascalCase?, ?? props? ?? ???? ?? ??? ?????.
?:
// Good: const isLoggedIn = true; const userProfile = { name: "John", age: 30 }; // Poor: const x = true; const obj = { name: "John", age: 30 };
- Context API? ???? ?????. React? Context API? ????? ??? ???? ??? ????? ?? ???? ???? ??? ????? ???? ???? ? ????. ??? ???? ??? ???????? Redux ?? Zustand? ?? ?? ?? ????? ??? ?????.
?:
import React, { createContext, useContext, useState } from 'react'; const AuthContext = createContext(); export function AuthProvider({ children }) { const [isAuthenticated, setIsAuthenticated] = useState(false); return ( <AuthContext.Provider value={{ isAuthenticated, setIsAuthenticated }}> {children} </AuthContext.Provider> ); } export function useAuth() { return useContext(AuthContext); }
- ??? ??? ?? ??? ????? React? ?? ?? ??? ?? ???? ??? ?? ??? ?? ??????. ???? ????? ????? ?????? React.memo?, ???? useMemo/useCallback? ?????.
?:
src/ ├── components/ │ └── Button/ │ ├── Button.js │ ├── Button.css │ └── index.js ├── pages/ │ └── Home.js └── App.js
- CSS ?? ?? ??? ?? ?? ?? CSS ??, ??? ?? ?? ?? ??? ??? ???? ?? ???? ?????. ???? ?? ????? ?? ???? ??? ??? ??? ???? ??? ? ??? ???.
CSS ??? ?:
// Instead of class component: class MyComponent extends React.Component { state = { count: 0 }; increment = () => { this.setState({ count: this.state.count + 1 }); }; render() { return <button onClick={this.increment}>{this.state.count}</button>; } } // Use functional component with hooks: import React, { useState } from 'react'; function MyComponent() { const [count, setCount] = useState(0); return <button onClick={() => setCount(count + 1)}>{count}</button>; }
??? ?? ??? ?:
import PropTypes from 'prop-types'; function Greeting({ name }) { return <h1>Hello, {name}</h1>; } Greeting.propTypes = { name: PropTypes.string.isRequired, };
- ???? ??? ???? ?? ?? ??? ???? ????? ???? ??? ??? ???? ? ??? ???. Jest ? React ??? ?????? ???? ?? ??? ?? ?? ???? ???? ???? ?? ??? ?????.
React ??? ?????? ??? ?? ?:
type GreetingProps = { name: string; }; const Greeting: React.FC<GreetingProps> = ({ name }) => { return <h1>Hello, {name}</h1>; };
??
??? ?? ??? ??? ???? ?? ???? ?? ??? ?? React ??? ??? ? ????. ?? ??, ??? ?? ?? ??, UI?? ?? ?? ? ?? ?? ???? React ??????? ?? ????? ??? ??? ? ?? ? ?? ??? ?????. ????? ??? ??? ???? ?? ??? ??? ?? ??? ? ??? ??? ????.
? ??? ReactJS ?? ??: ???? ?? ?? ??? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??

TAGGSATTHEBOTTOMOFABLOGPOSTORWEBPAGESERVESPRACTICALPURSEO, USEREXPERIENCE, andDESIGN.1.ITHELPSWITHEOBYOWNSESPORENGENSTOESTOCESKESKERKESKERKERKERDER-RELEVANTTAGSWITHOUTHINGTEMAINCONTENT.2.ITIMPROVESEREXPERKEEPINGTOPONTEFOCUSOFOFOFOCUSOFOFOFOCUCUSONTHEATECLL

JavaScript?? ??? ??? ?? ? ? ?? ??? ???????. 1. ?? ??? ??? ???? ?? ??? ????. ISO ?? ???? ???? ???? ???? ?? ????. 2. ?? ??? ?? ???? ??? ?? ???? ??? ? ??? ? ?? 0?? ????? ?? ??????. 3. ?? ?? ???? ???? ???? ?? ?????? ??? ? ????. 4. Luxon? ?? ???? ???? ?????? ???? ?? ????. ??? ?? ???? ????? ???? ??? ????? ?? ? ????.

??? ?? ? ??? DOM?? ??? ??? ? ?????. ??? ?? ????? ?? ??????, ??? ?? ???? ?? ????????. 1. ??? ??? addeventListener? usecapture ?? ??? true? ???? ?????. 2. ??? ??? ?? ???? usecapture? ???? ????? ?????. 3. ??? ??? ??? ??? ???? ? ??? ? ????. 4. ??? ?? ?? ?? ??? ?? ??? ??????? ??? ???? ?????. 5. ??? ?? ?? ?? ??? ?? ???? ?? ???? ? ??? ? ????. ? ? ??? ???? ???? JavaScript? ??? ??? ??? ????? ???? ???? ??? ??????.

JavaScript ?? ????? ??????? ??? ?? ??? ??? ????? ?? ??? ????. ????? ??? ?????. 1. ?? ?? (CodesPlitting) ??, ?? ??? React.lazy ()? ?? ?? ?? ?? ??? ????? ??? ???? ? ?? ????? ??? ?? ??? ???????. 2. ???? ?? ?? (???)? ????, ES6 ?? ????? ???? "Dead Code"? ???? ?? ? ????? ?? ??? ??? ? ???????. 3. ?? ??? ???? ???? GZIP/BROTLI ? TERSER? JS? ???? ??? ????? ???? ?? ???? ??? ? ? ??????. 4. ??? ???? ???? day.js ? fetch? ?? ?? ?????? ??????.

Node.js?? HTTP ??? ???? ? ?? ???? ??? ????. 1. ?? ????? ????? ??? ??? ? ?? ????? ?? ?? ? https.get () ??? ?? ??? ??? ? ?? ????? ?? ??? ?????. 2.axios? ??? ???? ? ?? ??????. ??? ??? ??? ??? ??? ??? ???/???, ?? JSON ??, ???? ?? ?????. ??? ?? ??? ????? ?? ????. 3. ?? ??? ??? ??? ??? ???? ???? ??? ??? ???? ?????.

ES ??? CommonJS? ?? ???? ?? ?? ? ?? ???????. 1. Commonjs? ????????? Node.js ?? ? ??? ?????. 2.ES ??? ???????? ????? ?? ???? ??? ?????. 3. ??, ES ??? ?? ??/????? ???? ??? ??? ?????? CommonJS? Quiew/Module.exports? ???? ???? ???? ?? ? ? ????. 4. Commonjs? Express? ?? ???? Node.js ? ?????? ?? ???? ?? ???? ?? ES ??? ?? ??? ?? ??? ?? ? Node.jsv14? ?????. 5. ?? ? ? ??? ?? ??? ??? ? ????.

JavaScript? ??? ?? ????? ??? ?? ??? ??? ?? ?? ?? ????? ?? ???? ???? ?????. ??? ?? ???? ?? ??? ?? ??? ???? ???? ?? ?? ???? ???? ?????. ?? ??, ??? ? ?? ???? ??? (? : ??? null? ??) ?? ??? ????? ??????. ??? ??? ???? ??? ??? ????. closure?? ?? ??? ?? ??; ? ??? ??? ?? ?? ???? ?? ???? ????. V8 ??? ?? ???, ?? ??, ??/?? ???? ?? ??? ?? ??? ??? ????? ?? ??? ?? ??? ????. ?? ?? ???? ??? ??? ??? ??? ???? ????? ?? ?? ???? ?? ???????.

VAR, Let ? Const? ???? ??, ?? ? ?? ?????. 1.var? ?? ??????? ?? ???? ?? ? ??? ?????. 2. let? ?? ?? ????? ?? ?? ???? ?? ? ??? ???? ????. 3. ???? ?? ?? ???? ?? ??????? ? ?? ? ? ??? ?? ??? ?? ?? ??? ? ????. ?? const? ???? ??? ??? ? LET? ???? VAR? ???? ????.
