What are spread operators?

The spread operator is a new addition to the set of operators in JavaScript ES6 . It takes in an iterable (e.g an array) and expands it into individual elements. The spread operator is commonly used to make shallow copies of JS objects. Using this operator makes the code concise and enhances its readability.

Read more

What means && In React?

The && is the exact same operator as you would find in any javascript expression , such as… if( condition1 && condition2) { } It is a feature of javascript that an expression of the form… (condition1 && condition2) will evaluate to condition2, if condition1 is true, or null if condition1 is false.

Read more

Prop nedir React?

Props : Bir component’e dışarıdan gelen verinin tutulduğu yapıdır. Props ‘lar sayesinde componentler arasında değer taşıması gerçekleştirilebilir. Örneğin bir listeden seçilen Item’ın unique id’si alınarak, farklı bir componente o id ile detay bilgilerine ulaşılması işleminde id’ye ulaşılması props ‘lar sayesinde olur.

Read more

State ve props nedir?

Kartların üzerine tıklanıldığında da işin; yapıldı, yapılmadı durumu (State ) değişecek. Görüldüğü üzere React kütüphanesi yazdığımız kodu bizim için oldukça anlamlı hale getiriyor. Props , oluşturduğumuz component’lerin özelliklerini tutarken, State ise sayfanın ya da bir componentin durumunu tutuyor.11 Haz 2020

Read more