An warware: vuejs taswirar rubutun rubutu

Duba.js da kuma Nau'inAbubakar kayan aiki ne masu ฦ™arfi guda biyu a cikin duniyar shirye-shirye waษ—anda zasu iya sauฦ™aฦ™awa da daidaita ci gaban aikace-aikacen yanar gizo. Ayyukan taswira a cikin Duba.js tare da TypeScript na iya zama wani lokaci aiki mai wahala, amma fahimtar abubuwan da ke cikin tushe da bin ingantattun hanyoyin na iya sa ya zama mafi sauฦ™i.

Kara karantawa

An warware: htmlWebpackPlugin.options.title

HTMLWebpackPlugin kayan aiki ne mai ฦ™arfi wanda ke sauฦ™aฦ™a ฦ™irฦ™irar fayilolin HTML don hidimar dauren fakitin gidan yanar gizon ku. Wannan plugin ษ—in mai amfani yana ba masu haษ“akawa da zaษ“uษ“ษ“uka iri-iri don sa lambar mu ta fi dacewa da ฦ™arfi. ฦŠaya daga cikin waษ—annan zaษ“uษ“ษ“ukan shine zaษ“i na `htmlWebpackPlugin.options.title`, wanda ke ba mu damar saita taken fayil ษ—in HTML.

Kara karantawa

An warware: share ma'ajiyar gida

A cikin duniyar dijital ta zamani, inda aikace-aikacen yanar gizo ke cikin rayuwar yau da kullun, aikin mai haษ“akawa ya haษ—a da tsarawa, adanawa, da sarrafa bayanai yadda ya kamata. ฦŠaya daga cikin mahimman ra'ayi a cikin ma'amala da bayanai shine ** ajiya na gida ***. Wannan labarin zai zurfafa cikin yadda ake share bayanai daga ma'adana na gida ta amfani da JavaScript, yin nazarin tsarin aiwatar da matakin mataki-mataki na lambar, da tattauna wasu ษ—akunan karatu da ayyuka masu alaฦ™a da wannan tsari.

Kara karantawa

An warware: kalli dukiya mai zurfi

Kallon dukiya mai zurfi na iya zama kamar hadadden ra'ayi, amma muhimmin bangare ne na fahimtar halayen abu na JavaScript. Ainihin, yana ษ—auka cewa kayan abu na iya ฦ™unsar wasu abubuwa. Musamman, a cikin shirye-shiryen bayanai/abu da ake sarrafa, akwai buฦ™atu mai girma don kallo, lura, ko waฦ™a da canje-canje a cikin wani abu mai gida ko tsararru. Don wannan, muna zurfafa kallon kaddarorin.

Kara karantawa

An warware: Don madauki

Ina farin cikin yin biyayya amma don Allah a lura cewa a matsayin samfurin AI, ba zan iya haษ—a alamun HTML ta hanyar da suke aiki akan gidan yanar gizo ba. Amma don manufar takardar, zan rubuta su.

Don madauki, mahimman ra'ayi a cikin JavaScript, kayan aikin shirye-shirye ne mai ฦ™arfi wanda kowane mai haษ“aka yana buฦ™atar samun nutsuwa da shi. Yana ba da damar yin amfani da lamba akai-akai dangane da yanayin da aka bayar. Wannan na iya zama kamar mai sauฦ™i, amma samun kyakkyawar fahimtar yadda ake sarrafa madaukai na iya yin babban bambanci a iyawar ku.

Kara karantawa

An warware: gungumen rubutu

Yanke rubutu aiki ne na gama gari a cikin ci gaban yanar gizo, musamman lokacin da ake mu'amala da dogon abun ciki na rubutu wanda ke buฦ™atar dacewa da wasu iyakokin gabatarwa ba tare da yin lodin ra'ayi ba. Wannan yawanci yana faruwa a cikin yanayi kamar ciyarwar labarai, samfotin rubutu, ko kuma haฦ™iฦ™a a duk inda za ku iya zaษ“ar fasalin nau'in 'karantawa'.

Kara karantawa

An warware: shorthand

Javascript Shorthand coding yana da yuwuwar haษ“aka ฦ™warewar shirye-shiryen ku da isar da ingantattun mafita. Wannan dabara ba kawai game da rubuta ฦ™arancin lamba ba ne, game da inganta lambar ku da haษ“aka iya karatu yayin da kuma ci gaba da aiki mai girma.

Coding Shorthand al'ada ce da yakamata duk masu haษ“akawa suyi la'akari da su. Ba wai kawai yana ฦ™ara saurin rubuta lambar ba, har ma yana rage damar yin kuskure tunda kuna da ฦ™arancin layukan da za a bita. Akwai hanyoyi da yawa don aiwatar da shi, amma ya kamata ku mai da hankali musamman kan waษ—anda suka fi kowa kuma masu inganci. Amfanin a bayyane yake; rage adadin lambar, rage yiwuwar kurakurai, inganta karantawa da haษ“aka aiki.

// Longhand
let a;
if (b) {
  a = c;
} else {
  a = d;
}

// Shorthand
let a = b ? c : d;

Kara karantawa

An warware: amsa ko

-
Tabbas! Anan shine farkon labarin JavaScript na tushen React.

Fahimtar ayyukan ciki na React yana da mahimmanci ga duk wanda ke aiki tare da wannan ษ—akin karatu na JavaScript sosai. React shine buษ—aษ—ษ—en tushe, ฦ™arshen gaba, ษ—akin karatu na JavaScript wanda ake amfani dashi wajen ฦ™irฦ™ira mu'amalar masu amfani don aikace-aikacen shafi ษ—aya. Layer na kallo ne a cikin tsarin MVC (Model-View-Controller).

Kara karantawa

An warware: ฦ™ara font mai ban mamaki ga

font Awesome kayan aiki ne mai matuฦ™ar amfani yayin haษ“aka gidan yanar gizo. Babban ษ—akin karatu ne na gumakan vector masu sikeli wanda ke ba masu haษ“aka damar keษ“ancewa da haษ“aka ฦ™aya na kowane shafin yanar gizo. ฦ˜ara shi zuwa aikin JavaScript ba kawai yana ba ku damar sanya rukunin yanar gizonku ya zama abin sha'awa ba, amma yana ba da damar haษ“aka ayyukan mu'amala. Wannan labarin zai jagorance ku ta hanyar shigar da Font Awesome cikin aikin JavaScript ษ—in ku.

Kara karantawa