E lele i ka Main ka maʻiʻo

ʻO ke kiʻi hea ka ʻoi aku ka maikaʻi? 2021

ʻEkolu mau papahana no ke kūkulu ʻana i nā kumu net i lohe ai kēlā me kēia mea hoʻomohala mua e pili ana i: pane koke, Vue.js, a Angular.

ʻO React kahi waihona UI, ʻo Angular kahi papa hana mua mua loa, akā ʻo Vue.js kahi pae holomua.

Hiki ke hoʻohana maʻalahi ʻia lākou e kūkulu i nā kumu o mua, akā ʻaʻole lākou 100% like, no laila ke akamai e nānā iā lākou a ʻike i kā lākou ʻano.

Hoʻonohonoho ʻia kēlā me kēia papahana a ʻae i ka hana wikiwiki ʻana i nā koho UI.

Eia nō naʻe, he hale kūkulu ʻokoʻa kā lākou āpau - no laila ka mea mua, e nānā mākou i kā lākou ʻano hoʻololi e hoʻopaʻa i ke akeakamai ma hope o lākou.

kuhikuhipuʻuone

pane koke

ʻAʻole hoʻohana ʻo React i kahi kūkulu hoʻāʻo i koho ʻia, a e like me kāu e ʻike ai mai ka kūhelu "Hello World" laʻana ma lalo, hiki iā ʻoe ke hoʻomaka me ka hoʻohana ʻana iā React me kekahi mau lihi o ke code.

ReactDOM.render ( Aloha, honua! , doc.getElementById ('root'));

Hiki ke hoʻohana ʻia ʻo React ma ke ʻano he waihona puke UI e hāʻawi i nā ʻāpana, me ka hoʻokau ʻana i kahi kūkulu hoʻāʻo i wae ʻia, a no laila ʻaʻole ia he kumu.

Nā Huahana React ʻo ia nā poloka kūkulu liʻiliʻi o React apps. ʻOi aku ka maikaʻi o lākou ma mua o nā ʻāpana DOM ma muli o ka hopena o ka React DOM e pani maikaʻi iā lākou i kēlā me kēia manawa ke hoʻololi ʻia kahi mea.

eiiiiiaiou kūkulu i nā palaka e kuhikuhi ana i nā mea kaulike ʻole a hoʻohana hou ʻia no nā mea āpau ma o ka noi ʻana. Kū lākou no nā mea hoʻokomo i ʻike ʻia he props a hana i nā ʻāpana i hōʻike ʻia i ka mea kūʻai aku.

Hilinaʻi ʻo React iā JavaScript, eia naʻe ua hui nui ʻia me JSX (JavaScript XML), kahi extension syntax e ʻae iā ʻoe e hana i nā ʻāpana e hoʻopili me HTML a me JavaScript i ka manawa like.

ʻO nā mea āu e hana ai me JSX hiki ke hana ʻia me ka React JavaScript API, akā makemake ka hapa nui o nā mea kūkulu iā JSX ma muli o ka hopena o ka ʻike nui.

ʻIke

Nānā wale ka waihona waihona nui ʻo Vue.js i ka papa View wale nō. ʻIke ʻia ia ma ke ʻano he holomua holomua ma muli o kāu e hoʻolōʻihi ai i kāna hana me nā pūʻulu ʻaoʻao a me nā ʻaoʻao ʻekolu, e like me ʻO Vue Router or Vuex, e hōʻike iā ia i kahi papahana kikoʻī.

ʻOiai ʻaʻole pili pono ʻo Vue i ka laʻana o ka MVVM (Model-View-ViewModel), ua pīhoihoi ʻia kāna hoʻolālā e ia. Me Vue, e hana holoʻokoʻa ʻoe ma ka papa ViewModel, e ʻike pono i ka hoʻopili ʻana i ka ʻike i loko o kahi ʻano hana e hiki ai i ke kiʻina e hāʻawi i kahi nānā hou.

ʻO Vue's syntax templating kōkua iā ʻoe e hana i nā ʻāpana Nānā, a hoʻohui ia HTML i ʻike ʻia me nā kuhikuhi a me nā koho kikoʻī. ʻO kēia syntax templating ka mea i makemake nui ʻia, ʻoiai me ka mea i kākoʻo ʻole ʻia ʻo JavaScript a me JSX i kuke ʻole ʻia.

eiiiiiaiou i Vue liʻiliʻi, paʻa ponoʻī, a hoʻohana hou ʻia ma o ka noi ʻana. Nā Huina Kōnae Hoʻokahi (SFCs) me ka .vue hoʻohui me HTML, CSS, a me JavaScript a no laila e noho kēlā me kēia code pili i kahi faila.

ʻO nā SFC ke ʻano kōkua nui e hoʻonohonoho i nā code ma nā hana a Vue.js, ʻoi aku ka nui. Koi ʻia nā meahana e like me Webpack a i ʻole Browserify e hoʻololi i nā SFC i ka hana ʻana i ka code JavaScript.

Angular

I kēia huaʻōlelo, ke kūkākūkā nei au i ka Angular 2, a ʻaʻole ia ke kumu mua o ke kumu i kapa ʻia ʻo AngularJS.

AngularJS, ke kiʻiona kū hoʻokahi, kahi papahana MVC (Model-View-Controller)). Akā i loko Kikowaena 2, ʻaʻohe pilina koʻikoʻi me MV * -pili ʻoiai he maʻa mau ia.

Hoʻonohonoho ʻia nā papahana ma Angular i modules, eiiiiiaiou, a Services. Loaʻa i kēlā me kēia pono Angular ma ka liʻiliʻi he hoʻokahi aʻa a me hoʻokahi modula aʻa.

Hoʻokomo kēlā me kēia mea i Angular i kahi Template, kahi Papa e wehewehe i ka loiloi pili, a me MetaData (nā mea hoʻonaninani). Hōʻike ka metadata no kahi mea i ka Angular i kahi e ʻimi ai i nā palaka e pono ai e hana a hana i kēia manawa i kāna ʻike.

Kākau ʻia nā anakuhi hihi i ka HTML akā hiki mai paha Syntax template kihi me nā kuhikuhi kikoʻī e hoʻopuka i ka ʻike hou a hāʻawi i kekahi mau ʻāpana, i waena o nā pilikia like ʻole.

Hoʻohana ʻia nā lawelawe i ka Angular e nā Components e ʻelele i nā hana ʻoihana loiloi e like me ke kiʻi ʻana i ka ʻikepili a i ʻole ka ʻae ʻana. ʻO lākou kahi ʻāpana o nā kumu Angular. ʻOiai ʻaʻole hoʻokō ʻo Angular i kā lākou hoʻohana, makemake nui ʻia ia i nā polokalamu kūkulu e like me kahi o nā ʻoihana like ʻole e hoʻohana hou ʻia.

Hoʻokomo ʻia ka Angular TypeScript, no laila kōkua maoli ka hoʻohana ʻana e kiʻi i ka mākaukau ʻoi loa, akā hiki ke kākoʻo ʻia ʻo JavaScript maʻalahi.

Makemake nui

pane koke

Me ke kānalua ʻole ʻo React kekahi o nā hana JavaScript ʻoi loa me nā hōkū 160k ma GitHub. Hoʻomohala a mālama ʻia e Facebook, a hoʻohana ʻia i loko o ka nui o kā lākou hana. Hoʻopili, mana ia ma luna o 2 miliona pūnaewele pūnaewele, i ka laina me Bu BuiltWithnā helu helu hoʻohana.

ʻIke

Mai loko o nā hoʻolālā ʻekolu, ʻo Vue ka nui o nā hōkū ma GitHub, me nā hōkū 176k. Hoʻokumu a alakaʻi ʻia ka luʻi e ex-Googler Evan You. He ʻaʻa ikaika a kūpaʻa ʻole ia i loko o ka pūʻulu kumuwaiwai a hoʻohana ʻia e ʻoi aku ma kahi o 1 miliona mau pūnaewele, me ka laina Bu BuiltWith.

Angular

Hoʻolālā ʻia ʻo Angular e Google, akā naʻe me ka pīhoihoi ʻaʻole ia e hoʻohana ʻia i kekahi o kā lākou mea kūʻai aku e like me ka Huli a Youtube paha. Hoʻohana mau ʻia ia i nā hana ʻoihana, a mana ia ma luna o 97,000 pūnaewele pūnaewele i hoʻokumu nui ʻia Bu BuiltWith'ike.

ʻO ia ka hōkū liʻiliʻi ma waena o nā papa hana he ʻekolu, me nā hōkū 68k ma GitHub. Eia nō naʻe, i ka hoʻololi ʻana mai Angular 1 a Angular 2, ua hana lākou i kahi waihona hou loa ma ke ʻano he kuʻuna o ka hoʻomau ʻana i ka AngularJS ʻaʻa, a he 59k nā hōkū hoʻi.

Ke kaiaola

ʻO nā pūʻulu kumu wehe e pale i ka manawa mālama waiwai ke hana ʻana i nā kumu. ʻAʻole wale ia, akā ʻoi aku ka kiʻekiʻe ma mua o nā ʻāpana a me nā ʻāpana i hana ʻia e like me ka hopena o kā lākou hoʻāʻo kaua.

Pono ia e nānā i ka hoʻolako ʻana i nā ʻāpana mākaukau e hoʻohana, nā poʻomanaʻo, a me nā mea kani like ʻole e hōʻike iā ʻoe pehea e hana maʻalahi ai i nā koho hou.

pane koke

Pili nā kumu mua he nui i ka hoʻomalu mokuʻāina o ka honua i ka ʻikepili kūʻai aku, i like me ka mea i ʻeʻe a me nā hoʻonohonoho mea kūʻai ʻokoʻa.

ʻO ka pahuhopu nui loa no ka hoʻokele mokuʻāina ʻo JavaScript Redux. Hoʻohana ka hapa nui o nā mea kūkulu hale i ka kūlana React bindings no Redux, mālama ʻia e ka hui Redux.

Ma muli o ko React kaulana, ʻike maʻalahi i ka ʻimi ʻana i nā ʻāpana a me nā ʻāpana mākaukau. He ʻimi Google a GitHub wale nō lākou a pau.

Loaʻa i loko ke kaiaolaola React Hoʻopaʻi i nā'ōiwi ʻae iā ʻoe e kūkulu i nā kumu ʻōiwi iOS a me Android mai kahi codebase hoʻokahi i kākau ʻia ma React. No laila, ʻo React maʻamau kahi koho ʻē aʻe no ke kūkulu ʻana i nā kumu pūnaewele e hoʻohana pū ana i nā ʻepekema noi net.

ʻO React kahi ʻāpana o ka MERN stack, kahi e hoʻopili nei iā MongoDB, ExpressJS, React, a me NodeJS. ʻO ka mea kupaianaha e pili ana i kēia hui ʻana, ʻo ia ka ʻōlelo hoʻokahi - JavaScript - mana ka hoʻohana holoʻokoʻa.

ʻIke

ʻOiai ʻo Redux hiki ke hoʻohana ʻia ma Vue, ʻaʻohe paʻa paʻa. Akā ʻaʻole pono kēlā makaʻu iā ʻoe ma ke ʻano he Vuex ʻo ia ka waihona waihona luna mokuʻāina i hana nui ʻia no nā kumu ʻo Vue. Ma waho o ka hoʻohui pono ʻana me Vue, maʻalahi ka debug me ka hoʻohana ʻana i nā mea hana a Vue.

I nā lā mua o Vue, ʻoi aku ka paʻakikī o ka ʻimi ʻana i nā ʻāpana mākaukau. Ma muli o ka ulu ʻana o ka hui, aia kekahi ʻano o nā ʻāpana komo a me nā ʻāpana kiʻekiʻe e hoʻohana ai ʻoe e wikiwiki i kāu hoʻomaikaʻi.

No ka hoʻomaikaʻi ʻana o ka polokalamu kelepona, aia kahi wī e hiki mai ana i ʻike ʻia Weex. Hoʻolālā a hoʻohana ʻia ʻo Weex e Alibaba, akā ʻaʻole naʻe ia he mākua a me ka maikaʻi e like me React Native. He aha keu keu, no ka mea ua hoʻomohala ʻia ka pilikia a hoʻohana nui ʻia ma Kina, ʻoi aku ka paʻakikī o ka ʻimi ʻana i nā palapala a me nā koho i nā helu ma ka ʻōlelo Pelekania.

Hoʻohui maikaʻi ʻo Vue me Laravel, a ʻo ia ke kumu e hoʻohana mau ʻia ai lākou. Hōʻike piha ʻo Laravel ʻO ka scaffolding ʻo JavaScript a me CSS e ʻae i ka hoʻohana ʻana iā Vue i nā hana hou.

Angular

No ka hoʻokele mokuʻāina ma Angular, pono ʻoe e hoʻohana i ka NgRx hoʻāʻo. Ua hoʻohiwahiwa ʻia e Redux, akā hana ʻia ia no Angular.

E like me loko o ka hihia o Vue a me React, nui nā māhele mākaukau e hiki ai iā ʻoe ke hoʻokomo i kāu mau hana. He aha ka mea ʻokoʻa loa e pili ana i ka Angular ʻoiai aia he nui nā ʻāpana kūloko i loko o ka Mea Hana Angular hoʻāʻo. He hoʻopiʻi kūhelu kēia na Google e hāʻawi nei i nā ʻāpana Material Material no nā hana Angular.

Hiki iā 'oe ke kūkulu i nā kumu paʻa kea kea ma ka hoʻohana' ana i ka Angular ʻScriptlelo Pukalani. Kōkua ia iā Vue me ka maikaʻi, akā ʻoi aku ke oʻo o ke kōkua Angular.

ʻO Angular kahi ʻāpana o ka MEAN stack kaulana e hui pū me Angongo me MongoDB, ExpressJS, a me NodeJS. E like me ka MERN stack, hilinaʻi nui ia ma JavaScript no kēlā me kēia mua a me ka hope.

Nā ʻenehana ʻenehana maʻamau

Hiki ke hoʻohana ʻia i ka Angular, React, a me ka Vue e hoʻomohala i nā Pūnaewele Holomua Holomua, i kapa ʻia ʻo PWAs.

ʻAʻole pono nā PWA i nā kumu pūnaewele akā i nā kumu net i hiki i nā mea kūʻai kelepona kelepona ke hoʻohui i mau pōkole i kā lākou hale hōʻike a hāʻawi i kahi hiʻohiʻona a manaʻo e like me nā polokalamu kelepona ʻōiwi.

Hiki iā ʻoe ke ʻike i nā anakuhi uku nui a me nā kumu i hana mua ʻia no kēlā me kēia kahua, akā ʻo Angular a me React he mau koho keu keu i hiki ke kiʻi ʻia ma mua o Vue.

Auana

Ke koho ʻana i kahi papahana a i ʻole hale waihona puke, makemake ʻoe e noʻonoʻo i ka pono e like me ka maikaʻi.

I nā kūlana he nui, ʻaʻole pono ʻoe e huhū e pili ana i ka pono, ke hana nei ʻoe i kahi pilikia liʻiliʻi. Eia nō naʻe, ulu aʻe kahi luʻi i ka laulā a me ka paʻakikī, hiki i ka pono (a hiki) ke ulu a lilo i mea nui.

He mea nui e ʻike i ke kūlana o ka hoʻomaikaʻi a me ka ukali ʻana i nā hana ʻoi loa e pili ana i ka pono net i ʻoi aku ka nui ma mua o ke koho ʻana o ka anga.

Akā no ka mea aia kekahi mau ana hoʻohālikelike a me nā loli, e nānā wau iā lākou a wehewehe i ka hopena o kēlā me kēia hopena i kāu mau hoʻomaikaʻi hoʻomaikaʻi.

ʻO JS Framework Benchmark: Angular vs. React vs Vue

Nā hopena o ka ʻO JS Framework Benchmark i kēia manawa e hoʻokō pono lākou āpau i nā pae hoʻohālikelike, like i ka hana ʻana a i ʻole ka hoʻopili ʻana i nā lālani i kahi pākaukau.

ʻO JS Benchmark

E like me kāu e ʻike ai ma luna, ua lohi ʻo Vue ma mua o Angular a React i ke koho ʻana i nā lālani. Ma ka ʻaoʻao ʻaoʻao, pono ʻole ka Angular a me ka React i ke ʻano o ka nohona ma nā lāpili kuapo.

ʻO kēia nā ʻano nui ʻokoʻa i ka hāʻawi ʻana i nā pae hoʻohālikelike - a maʻamau, loaʻa ʻole e hōʻike i nā hopena i ʻike ʻia. ʻOiai ke koho nui ʻia ʻana o nā lālani ma mua o ka hoʻololi ʻana i nā lālani, e ʻōlelo wau i kēia pae hoʻohālikelike i kahi o Vue i kahi ʻekolu ma hope o Angular a me React e kaʻana like i ka wahi kiʻekiʻe loa

Ke pili nei ia i ka reminiscence a me ka manawa booting, React a me Vue pane lāki pono me ka maikaʻi, eia naʻe Angular he lohi. Hiki i ka Angular ke lawe i 150ms ma waho o kahi palapala kumu a koi i ka reminiscence keu e holo.

Kahi Perf: Angular vs React vs Vue

Pūnaewele Perf na Google Chrome Labs e hōʻike nei i ka hana ʻana mai ka 1000 o nā pūnaewele. Hoʻopili ʻia kēia mau helu helu e nā pilikia like ʻole a ʻaʻole wale i ke kiʻina o kahi koho ʻē aʻe, akā e nānā i nā helu.

Pūnaewele Perf

Pena ʻAoʻao Kūlana Mua

ʻOi aku ka nui o nā pūnaewele ʻo Vue a me React no kēia metric i ka hoʻohālikelike ʻana me Angular i hiki ke lawe i kahi manawa keu a koe a me nā mea ʻikepili o kēia wā i ka mea kūʻai.

Pena ʻike ʻike nui loa

Hiki i ka Angular ke lohi i waena o nā hana he ʻekolu i ka hāʻawi ʻana i kahi ʻaoʻao pūnaewele holoʻokoʻa, me 27 wale nō pc o nā pūnaewele Angular e helu ana i loko o nā ʻae ʻoluʻolu.

Hoopanee komo mua

No nā kiʻina ʻekolu, ʻoi aku ma mua o 80 pc o nā pūnaewele i loko o ka ʻokoʻa i ʻae ʻia no ka lohi komo mua, e hōʻike ana i ka nui o ka mea a hiki i ka mea kūʻai aku ke hana pū me ka ʻaoʻao pūnaewele.

JavaScript Bytes

ʻO nā kumu o ke kaupaona māmā i hana ʻia me Vue, me 68 pc o nā polokalamu Vue e hoʻouka nei ma lalo o 1MB o JavaScript. Ma ka ʻaoʻao ʻē aʻe, kuhi ʻia nā kumu kihi a kihi e loaʻa kahi ana kuhi nui aʻe.

Pehea e hoʻohana ai i kēia mau metric

Hiki iā ʻoe ke ʻike i kahi hiʻohiʻona mai kēia mau kiʻi, akā ʻaʻole pono ʻoe e wikiwiki e hoʻokū i nā hopena. No ka hoʻoholo hope loa, no ka laʻana, pono paha kahi hōʻoia e hoʻohana ʻia ʻo Vue e hoʻomohala i nā kumu kaupaona keu keu akā hoʻohana ʻia ka Angular no nā hana nui.

Hiki i nā helu helu ke kōkua i ke alakaʻi ʻana iā ʻoe e hana i kahi koho maikaʻi loa, akā ʻaʻole hiki iā ʻoe ke hoʻohana iā lākou e hōʻike i ka wikiwiki a ʻoi paha o ke kiʻekiʻo ma mua o ka ʻaoʻao ʻē aʻe.

Nā Kūlana Kūlana

No nā kumu ʻoi aku ke kiʻekiʻe, pono ka mana o ka mua i ka hoʻohana e hiki ke hoʻokō i kekahi mau hana e hoʻonui ai i ka pono a piʻi paha i luna.

ʻElua ʻepekema i noi ʻia i kī paha i ka hāʻawi ʻana i ka ʻaoʻao ʻaoʻao kikowaena (SSR) a me ka virtualization.

pane koke

Kōkua ʻo React i ka hāʻawi ʻana o ka ʻaoʻao pūnaewele me ka luna ReactDOMServer puolo. No ka virtualization, pono ʻoe e hoʻohana i kahi hāmeʻa ʻaoʻao i makemake ʻia i kapa ʻia React Virtualized.

ʻIke

Kākoʻo ʻia ka hāʻawi ʻana o ka ʻaoʻao kikowaena i Vue me ke ʻano kūpono me ka luna Pūʻulu SSR. Hoʻohui, hiki iā ʻoe ke hoʻohana i ka Nuxt.js kūkulu i kūkulu ʻia ma ke kiʻekiʻe o Vue a kōkua iā SSR.

ʻO nā koho virtualization ma Vue ʻaʻole pono ia ikaika, kaumaha. I koʻu manaʻo, Papa inoa Pepa Wili Vue ʻo ia ka hoʻonā maikaʻi loa loa no ka ʻōwili digital, eia naʻe he kaʻa buggy ia a ʻaʻole paʻa loa no ka mea ʻo nā koho no React a me Angular.

Angular

Loaʻa iā Angular ka luna Huina Nui puolo no SSR, a me kahi ʻāpana kūhelu no ka ʻōwili ʻana i nā mīkini a me ka hāʻawi aloha ʻana o ka nohona o nā papa inoa nui.

ʻ Curlau aʻo

Pehea ka maʻalahi o ka hoʻopaʻa ʻana i kēlā me kēia papahana?

No ka pane ʻana i kēia nīnau, pono mākou e nānā i ka paʻakikī o kēlā me kēia anga a me nā manaʻo a lākou e hoʻolauna ai.

pane koke

I kāna hihia hoʻohana maʻalahi, ʻo React ka mea liʻiliʻi paʻakikī o nā hoʻolālā ʻekolu. ʻO ia wale nō ka mea e pono ai e lawe mai i ka waihona, a laila hiki iā ʻoe ke hoʻomaka i ke kākau ʻana i kāu hoʻohana React me nā mehe o ke code.

Akā ʻē aʻe ma kahi o ka Hello World, ʻo ka hapa nui o nā kumu React i hoʻokumu ʻia a ʻaʻole hāʻawi i nā ʻāpana ʻelua i ka ʻaoʻao pūnaewele.

ʻO kahi mea i ʻike ʻia e kekahi poʻe kūkulu hale ʻano ʻē a paʻakikī paha e pili ana iā React, ʻo ia ka ʻoiaʻiʻo ʻo ke aʻo ʻana iā JSX kahi ala hoʻokahi. Hiki iā ʻoe ke hoʻohana i ka JavaScript moʻa ʻole i ka maikaʻi, akā no ka mea ʻo ka hapa nui o nā mea kūkulu React e hoʻohana iā JSX, ke aʻo nei e pili ana i ka mea hiki ʻole ke alo ʻia.

ʻO kēia ke kumu nui i hiki ke hoʻolilo i kā React's curve curve i kahi ʻoi aku ka maikaʻi, eia naʻe ma mua o kēlā, he hale waihona puke maʻalahi ia e aʻo no nā mea kūkulu kūkulu ʻike i ka JavaScript a ʻike i nā manaʻo hoʻomaikaʻi upena.

ʻIke

ʻOi aku ka paʻakikī o Vue e hoʻonohonoho ma mua o React. Hiki iā ʻoe ke hoʻohana iā ia ma kahi waihona e hōʻike i nā ʻāpana āu e hoʻohana ai ma o kāu HTML - akā e like me React, ʻaʻole pēlā e kūkulu ʻia ai ka hapa nui o nā hana.

ʻO ka hapa nui o nā hana a Vue kahi aʻa aʻa i kapa ʻia App.vue a me nā ʻāpana ʻōpio he nui no ka hōʻike ʻana i nā pilikia like ʻole.

Ke pili nei ia i ka syntax, ʻo kahi mea hou āu e pono ai e aʻo ʻo Vue's template syntax, a maʻalahi paha e maopopo inā ʻike ʻoe i ka HTML. Nā kuhikuhi kumu, like v-if a v-for no ka hāʻawi kumu ʻana a me ka papa inoa ʻana, maʻalahi no ka hopu ʻana no nā rookies.

Hoʻohui ʻia, mālama nā ʻāpana file hoʻokahi o Vue i nā code mua a pau ma kahi hoʻokahi, e maʻalahi ai e hoʻomākaukau i nā hana hou.

ʻO Vue ka mea maʻalahi e aʻo ai, i kaʻu ʻike, ma muli o ka maʻalahi a me ka syntax intuitive.

Angular

ʻO ka Angular ka pahuhopu paʻakikī nui loa o ka hana ʻekolu mai loko mai o nā mea ʻekolu, a no ka mea he puhi i mua o ka hopena i puhi ʻia, pili ia i nā manaʻo keu.

Ma waho o nā ʻāpana, kōkua nā Angular i nā modula a me nā hui. Kuhi ʻia ʻoe e kau i ke kākau ʻana a hoʻolālā i kāu codebase i kahi ʻano i koho ʻia e mālama pono ai i kāu hōʻaʻē ke unahi ʻia.

No ka syntax, ʻoiai ʻo Angular e hana nui nei me TypeScript, he mea nui ia e ʻike ʻoe iā TypeScript i ke kūkulu ʻana i kahi pilikia Angular.

Pēlā nō me Vue, pono ʻoe e hoʻomaʻamaʻa hou iā ʻoe iho me ka syntax like HTML me ka manaʻo e hoʻomaka i ke kaomi ʻana i nā koho UI hou me Angular.

I koʻu manaʻo, ʻo Angular ka mea ʻoi loa e aʻo no ka mea hoʻomohala maʻamau ma muli o ka paʻakikī loa a pili i ka TypeScript.

Nā Wanana e hiki mai ana

Nui nā hana wehe kumu a me nā hoʻolālā e mae i ka hoʻopoina a ulu a mālama ʻole ʻia. Pono paha ʻoe e makaʻu e pili ana i kekahi o nā papahana e kūkākūkā nei mākou ma aneʻi?

ʻOiai ʻaʻole mākou e wānana loa i ka mea e hiki mai ana, kahi hana hoʻomaikaʻi mau kahi hōʻailona maikaʻi o ke ola o kēlā mau hana. ʻO ke kaulana a me ka holomua nā metric waiwai nui e wānana i ka lōʻihi o kahi pilikia, no laila e nānā i kēlā me kēia anga.

pane koke

React v17.0 ua hemo aku, akā pūʻiwa, ʻaʻole ia i hōʻike i kekahi koho hou no nā mea kūkulu hale.

ʻO ka hoʻololi nui o kēia hiʻohiʻona hou i maʻalahi e hoʻomaikaʻi iā React iā ia iho. Hiki iā ʻoe ke hoʻomaikaʻi i kekahi mau mea o React mai ke k thekohu kahiko a i ka mea hou aku, me ka hoʻomaikaʻi ʻana i ka pahuhopu holoʻokoʻa.

Inā pili kāu pono i nā koho i hoʻololi a hoʻowahāwahā ʻia paha me ka mana hou loa, hiki iā ʻoe ke mālama i ke k previouskohu o mua e mālama ola i kēia hana. Hana kēia pani iā ​​React i kahi koho manawa lōʻihi kupaianaha ma muli o ka hopena e maʻalahi ka hoʻomau hou ʻana me nā loli hou.

Ua ulu ʻo React e 44 pc ma hope o 12 mau mahina i hoʻoiho npm i kēlā me kēia pule. I nā helu piha, eia nō naʻe ʻo ka mea i hoʻoiho ʻia o nā hana ʻekolu.

ʻIke

Ua hoʻokuʻu ʻia ʻo Vue 3 i Kepakemapa 2020, a kau i nā helu koʻikoʻi he nui a Vue 2 i nā hana nunui. Hōʻike ia i ka API haku mele i mahalo ʻia e Nā Paha React a hana maʻalahi iā ia e hoʻohana hou i ka loiloi ma nā ʻāpana.

Ua kākau hou ʻia ka pahuhopu holoʻokoʻa ma TypeScript, kahi e hoʻomaikaʻi ai i ke kōkua TypeScript i nā hana ʻo Vue hou akā ʻo ia ka mea e hoʻomau ai i ka hōʻaʻo.

ʻO Vue 3 kahi mea e pono ai ka hoʻomaikaʻi a hoʻolilo iā Vue i kahi hoʻokūkū ʻoi aku no nā hana nui.

ʻO Vue's Hoʻoiho i kēlā me kēia pule ua ulu e 87 pc mai nā mahina he 12 i hala, e hana ana iā Vue i ke ʻano wikiwiki e piʻi aʻe nei i nā huaʻōlelo pili. Inā hiki iā Vue ke kākoʻo i kēia kumukūʻai holomua, a laila hiki ke ʻoi aku i ka Angular me ka wikiwiki.

Angular

Ua hoʻolauna koke ʻo Angular i ka ʻO Ivy Compiler. Hoʻoemi ia i nā hanana kūkulu, hoʻomālama i nā waiwai, ʻae no ka hoʻāʻo wikiwiki ʻana, a hoʻomaikaʻi maʻamau i ka mākaukau hoʻomohala.

Hoʻokuʻu ka hui Angular i nā mea hou i ka helu o ʻelua mau manawa i ka 12 mau mahina, kahi e hoʻokomo ai i nā koho hou a i ʻole e lawe wale i ka papa i ka kaohi me nā ʻimi pūnaewele hou.

Ua ulu ʻo Angular ma kahi o 50 pc i Hoʻoiho i kēlā me kēia pule mai nā mahina he 12 i hala, no laila he wī i makemake ʻia.

Panina

ʻO Angular, React, a me Vue nā mea ma lalo o ka hoʻomaikaʻi ola. Hoʻokomo pinepine lākou i nā ʻano hou a mālama i nā mea e kū nei. Ma muli o ke ʻano o ke kōkua he nui i kēlā me kēia hihia, hiki iā ʻoe ke hoʻohana palekana i kēlā me kēia ʻano.

He mea nui ia e ʻike i ka piʻi ʻole ʻana o Angular i ka wikiwiki ma mua o ka manawa, akā ʻo Vue - ʻoiai ʻo ka hoʻomaka o keu i kēia mau lā - ke piʻi nei i mua ka nui.

E like me ka mea i hoʻomaopopo ʻia ma mua, ʻaʻole mākou e wānana i nā ʻoihana e pili mau ana i ka holo lōʻihi, akā naʻe, he hui kupaianaha ko kēlā me kēia pilikia a e ulu mau nei.

ʻO kaʻu pahuhopu me kēia huaʻōlelo ka wehewehe ʻana i nā loli kuhikuhipuʻuone, wāwahi i nā ikaika a me nā nāwaliwali o kēlā me kēia anga, a loiloi iā lākou i nā wahi a pau e pili ana.

Ma mua o ka lele ʻana i loko o kahi papahana hou, aia kekahi mau mea e noʻonoʻo ai.

ʻO ka mea mua, ʻo ka mākaukau o kāu hui kahi hihia hoʻoholo i ke koho ʻana i kahi ʻike hou.

Pēlā nō, pono ʻoe e noʻonoʻo i ka mākaukau i hiki i kou wahi me ka manaʻo e hoʻolimalima i nā mea kūkulu hale i kāu pilikia.

ʻO ka mea hope loa, e pili ana i ka pilikia ponoʻī, ka hopena a me ka laulā i hopena i kāu koho o ka hoʻolālā.

Ma ka hāʻawi ʻana i kahi ʻae no nā ʻano mea nui āpau, lana koʻu manaʻo e hoʻoholo paha ʻoe i ke kumu o ka palena mua loa maikaʻi loa i kāu mau pahuhopu a me kou mau makemake.



He Manaʻo kēia Puna

Waiho i ka Reply

Ko oukou mail aae? E, aole e paʻiʻia. I kauoha ia mahinaʻai, ua hoailono aku la *

Back To Top