? ??????? ????? ?? ?? ???? ?? ?? ??? ????? ???? ???? ???????. ???? ?????? ???? ????? ??????? ? ?? ?? ??? ???? ???? ???? ?????. ? ?????? ???? ?????? ??, React? ???? ?? ???? ??, ?? ????? ???? ??? ?? ???????.
???? ?????? ??????
???? ?????? ??????? ????? ?????? ?????. ?? ???? ?????? ?? ???? ?????? ???? ??????? ?? ???? ??? ????? ???? ??? ? ????. ? ?? ??????? ?? ??? ??? ? ???? ???? ?? ???? ?????.
???? ?????? ?? ??:
????? ?? ??: ? ???? ?????? ????? ??, ??? ? ??? ?????.
?? ????: ?? ??? ???? ?????? ?? ??? ??? ??? ? ?? ???? ?????.
? ???: ?? ????? ???? ???? ?? ??? ?? ? ????.
???? ?????? ???? ??? ??????
???: ??????? ???? ?? ???? ?????? ???? ?? ?? ?? ?? ??? ??? ? ????.
? ?? ??: ???? ??? ? ?? ??? ??? ?? ?? ??? ?????.
????? ??: ?????? ???? ??, ??? ? ????? ? ????.
React? ???? ????? ????
- ???? ????? ???? ?? ???? ?????? ???? ?? ?? ?? ?? ??? ????. ??? ?? ???? ? ?? ?????.
Iframe ??: ? ???? ?????? iframe? ?????. ? ?? ??? ??? ???? ????? ???? ? ????? ???? ?? ? ????.
JavaScript ??: ? ???? ?????? ?? ??????? ???? ??? JavaScript ?????. ? ?? ??? ???? ? ?? ??? ?? ?? ??? ?????.
- ???? ????? ?????? ?? JavaScript ?? ?? ??? ???? ??? ??? ??? ?????. ??? ?????? ?? ??? ??? ? ?? ??? ??? Webpack Module Federation? ???????.
1??: ? ?? React ?????? ??
? ?? ?? React ??????? ?????. ??? ?????? ?? ??? ???? ?????????.
npx create-react-app host-app npx create-react-app micro-frontend
2??: Webpack ?? ?? ??
???? ????? ???????? ??? ???? ?????.
npx create-react-app host-app npx create-react-app micro-frontend
?? ?? webpack.config.js? ???? ???? ????? ?? ??? ?????.
npm install --save-dev webpack webpack-cli webpack-dev-server @module-federation/webpack
??? ??? ???? ?????? ????? ?????.
// micro-frontend/webpack.config.js const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin"); module.exports = { // ... other configurations plugins: [ new ModuleFederationPlugin({ name: "micro_frontend", filename: "remoteEntry.js", exposes: { "./Button": "./src/Button", // Expose the Button component }, shared: { react: { singleton: true }, "react-dom": { singleton: true }, }, }), ], };
3??: ???? ????? ??
?? ??? ??? ???? ????? ?? ??? ???? ??? ? ????.
// host-app/webpack.config.js const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin"); module.exports = { // ... other configurations plugins: [ new ModuleFederationPlugin({ name: "host", remotes: { micro_frontend: "micro_frontend@http://localhost:3001/remoteEntry.js", }, shared: { react: { singleton: true }, "react-dom": { singleton: true }, }, }), ], };
- ?????? ?? ? ??????? ?? ?? ???? ???? ???. ?? ?? ?? 3001?? ???? ?????? ???? ?? 3000?? ??? ?? ??? ? ????.
// host-app/src/App.js import React, { useEffect, useState } from "react"; const App = () => { const [Button, setButton] = useState(null); useEffect(() => { const loadButton = async () => { const { Button } = await import("micro_frontend/Button"); setButton(() => Button); }; loadButton(); }, []); return ( <div> <h1>Host Application</h1> {Button ? <Button label="Click Me!" /> : <p>Loading...</p>} </div> ); }; export default App;
?? http://localhost:3000?? ???? ??? ??????? ???? ??????? ??? ???? ?? ? ? ????.
???? ?????? ??? ????? ??????? ????? ??? ? ?? ?? ???? ??? ???? ??? ??? ?????. React? Webpack Module Federation? ?? ??? ???? ? ???? ???? ?? ??? ??? ?? ??? ????? ?? ? ????. ???? ????? ??? ??? ? ?? ?? ???? ???? ??? ???? ???? ?? ??? ?? ??? ?? ??? ?????.
? ??? React? ??? ???? ?????: ?? ???? ?? ?????. ??? ??? 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)

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

JavaScript ??? ??? ?? ?? ? ?? ???? ????. ?? ???? ???, ??, ??, ?, ???? ?? ? ??? ?????. ?? ????? ?? ?? ? ? ??? ????? ?? ??? ??? ????. ??, ?? ? ??? ?? ?? ??? ??? ??? ???? ??? ??? ???? ??? ?? ??? ????. ?? ? ????? ??? ???? ? ??? ? ??? TypeofNull? ??? ?????? ??? ? ????. ? ? ?? ??? ???? ?????? ????? ???? ??? ???? ? ??? ? ? ????.

?????, JavaScript ???! ?? ? JavaScript ??? ?? ?? ?????! ?? ?? ??? ??? ??? ? ????. Deno?? Oracle? ?? ??, ??? JavaScript ?? ??? ????, Google Chrome ???? ? ??? ??? ???? ?????. ?????! Deno Oracle? "JavaScript"??? ????? Oracle? ?? ??? ??? ??????. Node.js? Deno? ??? ? Ryan Dahl? ??? ?????? ???? ????? JavaScript? ??? ???? Oracle? ????? ???? ?????.

??? JavaScript?? ??? ??? ?????? ?? ???????. ?? ??, ?? ?? ? ??? ??? ?? ????? ????? ?????. 1. ?? ??? ??? ????? ???? ??. ()? ?? ??? ??? ?????. ?. ()? ?? ??? ?? ??? ??? ?? ? ? ????. 2. ?? ??? .catch ()? ???? ?? ??? ??? ?? ??? ??????, ??? ???? ???? ????? ??? ? ????. 3. Promise.all ()? ?? ????? (?? ?? ?? ? ??????? ??), Promise.Race () (? ?? ??? ?? ?) ? Promise.AllSettled () (?? ??? ???? ??)

Cacheapi? ?????? ?? ???? ??? ???? ???, ?? ??? ??? ?? ???? ? ??? ?? ? ???? ??? ??????. 1. ???? ????, ??? ??, ?? ?? ?? ???? ???? ??? ? ????. 2. ??? ?? ?? ??? ?? ? ? ????. 3. ?? ?? ?? ?? ?? ??? ??? ?? ?????. 4. ??? ???? ?? ?? ???? ?? ?? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 5. ?? ???? ??, ??? ??? ? ??? ??, ?? ??? ? ?? ???? ???? ???? ? ?? ?????. 6.?? ??? ?? ?? ?? ??, ???? ?? ? HTTP ?? ????? ?????? ???????.

JavaScript? ??? ??? ?? ??, ? ? ? ?? ???? ???? ??? ??? ?????. 1. ?? ??? ?? ??? ???? ??? ??? ??? ??? ?? WebAPI? ?????. 2. WebAPI? ??????? ??? ?? ? ? ??? ?? ??? (??? ?? ?? ???? ??)? ????. 3. ??? ??? ?? ??? ?? ??? ?????. ?? ??? ??? ????? ??? ??? ?? ? ???? ?????. 4. ???? ?? (? : Promise. 5. ??? ??? ???? ?? ???? ???? ?? ?? ?? ??? ????? ? ??????.

??? ??? ?? ???? ?? ??? ???? ?? ??? ??? ?? ??? ?? ??? ?????. 1. ??? ?? : ?? ??? ?? ? ? ???? ?? ??? ???? ??? ???? ??????. ?? ??, ??? ?? ? ? ?? ??? ?? ? ?? ??? ??????. 2. ??? ?? : ??? ???? ?? ?? ??? ?? ???? ????? ? ?? ?????? ???? ????? ? ?? ?? ??? true? ??????. 3. ?? ???? ?? ?? ??? ?? ??, ?? ??? ? ?? ???? ?????. 4. DOM ??? ???? ??, ?? ? ??? ? ??? ??? ?? ???? ?? ???? ?????.

JavaScript ???? ? ? ?? ??? ???? ??? ???? ?? ??? ????. 1. ??? ???? ??? ??, ??, ??? ?? ? ??? ??? ?? ? ? ????. 2. ?? ? findIndex? ?? ?? ?? ???? ?? ? ?????. 3. ??? ??? ????? ?? ?? ??? ???? ? ?????. 4. ??? ?? ? ? ??? ?? ??? ?????. 5. ???? ??? ?? ??? ??? ? ?? ?????????. ??? ??? ????? ???? ????? ????.
