Babel yog lub cuab yeej cuab tam uas yog qhov tseem ceeb siv los hloov ECMAScript 2015+ code rau hauv rov qab tau tshaj version ntawm JavaScript hauv cov browsers tam sim no thiab qub lossis ib puag ncig.
Babel yog dab tsi thiab vim li cas siv nws?
Babel yog qhov pub dawb thiab qhib qhov chaw JavaScript transcompiler uas yog qhov tseem ceeb siv los hloov ECMAScript 2015+ (ES6+) code rau hauv rov qab tau tshaj version ntawm JavaScript uas tuaj yeem khiav los ntawm laus JavaScript engines. … Babel plugins yog siv los hloov cov syntax uas tsis tau txais kev txhawb nqa dav dav rau hauv qhov rov qab-compatible version.
Thaum twg kuv yuav tsum siv Babel?
Yuav tsum siv Babel los ua nco ntsoov tias txhua tus yuav tuaj yeem khiav koj tus lej , lwm yam koj tuaj yeem txhim kho yam tsis muaj nws.
Yog koj xav tau:
- siv cov qauv (nrog xav tau lossis ntshuam …)
- use JSX.
- txhawb nqa ntau browsers.
- siv cov yam ntxwv siab dua (async / tos), qee qhov tseem nyob hauv cov lus pom zoo (decorators, class properties..)
Babel ua haujlwm JavaScript li cas?
Babel yog a JavaScript transpiler uas hloov cov ntug JavaScript rau hauv ES5 JavaScript qub uas tuaj yeem khiav hauv txhua qhov browser (txawm cov qub). Nws ua rau muaj tag nrho cov suab thaj syntactic uas tau ntxiv rau JavaScript nrog cov tshiab ES6 specification, nrog rau cov chav kawm, rog xub thiab ntau kab.
Puas yog Babel tseem xav tau xyoo 2020?
Nyob rau xyoo 2020, cov neeg tsim tawm pem hauv ntej tseem nkim sijhawm ntau nrog kev siv ntau dhau. Babel tau pom los ntawm qee qhov yog qhov tsim nyog, tab sis kuv xav qhia koj tias nws tsis yog.