js.zonayed.me
js.zonayed.me copied to clipboard
জাভাস্ক্রিপ্ট ইএস ৬(ES6): ডি-স্ট্রাকচারিং (Destructuring)
জাভাস্ক্রিপ্ট ইএস ৬(ES6): ডি-স্ট্রাকচারিং (Destructuring) | হাতেকলমে জাভাস্ক্রিপ্ট
জাভাস্ক্রিপ্ট এর ইএস৬ বা পরের ভার্শনগুলো মূলত স্মার্ট প্রোগ্রামিং এর জন্যেই আসছে। এখানে আপনি ইএস৬ ইউজ করে আরো স্মার্ট হয়ে উঠবেন, সেই সাথে কম কোড, কম লেখায় বেশী কাজ করতে পারবেন। ডি-স্ট্রাকচারিং এর কাজটাও মূলত তাই। এটা নতুন কোনো ব্যাপার বা ফিচার না। বরং এটা একটা টেকনিক, স্মার্ট প্রোগ্রামিং, সিন্ট্যাক্টিক শ্যুগার। এখন এই ডি-স্ট্রাকচারিং এর […]
Not sure why, but I had to reset the env using this code "npm install babel-preset-env --save" to automate the conde conversion. Sharing here as you may also need this :)
very simple and helpful .
Awesome!! but without practice this will go over head. :)
const { service } = useParams(); const history = useHistory();
What is the difference between this two line. I have understood destructuring. But sometime I see something like first line where only one variable inside curly brace.
@AlaminCoding const { service } = option is equal to const service = option.service When you remove the {} you are removing the destructuring assignment.
🖤