From b1e256c89d3084d96d8c9bae7c6ddd86e2bc8bc3 Mon Sep 17 00:00:00 2001
From: shm-dsgn <77527904+shm-dsgn@users.noreply.github.com>
Date: Tue, 30 May 2023 02:03:59 +0530
Subject: [PATCH 1/9] First commit, minor changes
---
src/content/learn/reacting-to-input-with-state.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/content/learn/reacting-to-input-with-state.md b/src/content/learn/reacting-to-input-with-state.md
index 522aa63a1..f0bd6cf94 100644
--- a/src/content/learn/reacting-to-input-with-state.md
+++ b/src/content/learn/reacting-to-input-with-state.md
@@ -1,24 +1,24 @@
---
-title: Reacting to Input with State
+title: State এর সঙ্গে Input-র upor প্রতিক্রিয়া
---
-React provides a declarative way to manipulate the UI. Instead of manipulating individual pieces of the UI directly, you describe the different states that your component can be in, and switch between them in response to the user input. This is similar to how designers think about the UI.
+React UI ম্যানিপুলেট করার জন্য একটি ঘোষণামূলক উপায় সরবরাহ করে। UI-র প্রতিটি টুকরো সরাসরি ম্যানিপুলেট করার পরিবর্তে, আপনি আপনার কম্পোনেন্টের বিভিন্ন state-র বর্ণনা করেন, এবং ব্যবহারকারীর input-র জন্য তাদের মাঝে switch করেন। এটি UI-র বিষয়ে ডিজাইনাররা কীভাবে চিন্তা করে, তার মতো।
-* How declarative UI programming differs from imperative UI programming
-* How to enumerate the different visual states your component can be in
-* How to trigger the changes between the different visual states from code
+* কিভাবে ঘোষণামূলক UI প্রোগ্রামিং অপরিহার্য UI প্রোগ্রামিং থেকে পৃথক(alada)
+* আপনার কম্পোনেন্ট যে বিভিন্ন ভিজ্যুয়াল অবস্থায় থাকতে পারে তা কীভাবে গণনা করবেন
+* কোড থেকে বিভিন্ন ভিজ্যুয়াল স্টেটের মধ্যে পরিবর্তনগুলি কীভাবে ট্রিগার করবেন
-## How declarative UI compares to imperative {/*how-declarative-ui-compares-to-imperative*/}
+## কীভাবে ঘোষণামূলক UI অপরিহার্য UI-র সাথে তুলনা করে {/*how-declarative-ui-compares-to-imperative*/}
-When you design UI interactions, you probably think about how the UI *changes* in response to user actions. Consider a form that lets the user submit an answer:
+আপনি যখন UI ইন্টারঅ্যাকশন ডিজাইন করেন, আপনি সম্ভবত ব্যবহারকারীর ক্রিয়াকলাপের প্রতিক্রিয়ায় UI কীভাবে *পরিবর্তিত* হয় সে সম্পর্কে চিন্তা করেন। এমন একটি ফর্ম বিবেচনা করুন যা ব্যবহারকারীকে একটি উত্তর জমা দিতে দেয়:
* When you type something into the form, the "Submit" button **becomes enabled.**
* When you press "Submit", both the form and the button **become disabled,** and a spinner **appears.**
From 965c340883b2d01face233ddcc6d655e1d14df3b Mon Sep 17 00:00:00 2001
From: shm-dsgn <77527904+shm-dsgn@users.noreply.github.com>
Date: Tue, 30 May 2023 13:45:42 +0530
Subject: [PATCH 2/9] thinking-about-ui-declaratively
---
.../learn/reacting-to-input-with-state.md | 89 +++++++++----------
1 file changed, 43 insertions(+), 46 deletions(-)
diff --git a/src/content/learn/reacting-to-input-with-state.md b/src/content/learn/reacting-to-input-with-state.md
index f0bd6cf94..584a3bead 100644
--- a/src/content/learn/reacting-to-input-with-state.md
+++ b/src/content/learn/reacting-to-input-with-state.md
@@ -1,7 +1,6 @@
---
-title: State এর সঙ্গে Input-র upor প্রতিক্রিয়া
+title: State এর সঙ্গে Input-র ওপর প্রতিক্রিয়া
---
-
React UI ম্যানিপুলেট করার জন্য একটি ঘোষণামূলক উপায় সরবরাহ করে। UI-র প্রতিটি টুকরো সরাসরি ম্যানিপুলেট করার পরিবর্তে, আপনি আপনার কম্পোনেন্টের বিভিন্ন state-র বর্ণনা করেন, এবং ব্যবহারকারীর input-র জন্য তাদের মাঝে switch করেন। এটি UI-র বিষয়ে ডিজাইনাররা কীভাবে চিন্তা করে, তার মতো।
@@ -10,20 +9,20 @@ React UI ম্যানিপুলেট করার জন্য একট
-* কিভাবে ঘোষণামূলক UI প্রোগ্রামিং অপরিহার্য UI প্রোগ্রামিং থেকে পৃথক(alada)
+* কিভাবে ঘোষণামূলক UI প্রোগ্রামিং অপরিহার্য UI প্রোগ্রামিং থেকে আলাদা
* আপনার কম্পোনেন্ট যে বিভিন্ন ভিজ্যুয়াল অবস্থায় থাকতে পারে তা কীভাবে গণনা করবেন
* কোড থেকে বিভিন্ন ভিজ্যুয়াল স্টেটের মধ্যে পরিবর্তনগুলি কীভাবে ট্রিগার করবেন
-## কীভাবে ঘোষণামূলক UI অপরিহার্য UI-র সাথে তুলনা করে {/*how-declarative-ui-compares-to-imperative*/}
+## কীভাবে ঘোষণামূলক UI অপরিহার্য UI-র সাথে তুলনা করে
আপনি যখন UI ইন্টারঅ্যাকশন ডিজাইন করেন, আপনি সম্ভবত ব্যবহারকারীর ক্রিয়াকলাপের প্রতিক্রিয়ায় UI কীভাবে *পরিবর্তিত* হয় সে সম্পর্কে চিন্তা করেন। এমন একটি ফর্ম বিবেচনা করুন যা ব্যবহারকারীকে একটি উত্তর জমা দিতে দেয়:
-* When you type something into the form, the "Submit" button **becomes enabled.**
-* When you press "Submit", both the form and the button **become disabled,** and a spinner **appears.**
-* If the network request succeeds, the form **gets hidden,** and the "Thank you" message **appears.**
-* If the network request fails, an error message **appears,** and the form **becomes enabled** again.
+* আপনি যখন ফর্মে কিছু টাইপ করেন, তখন "জমা দিন" বোতামটি **সক্রিয় হয়ে যায়।**
+* আপনি যখন "জমা দিন" টিপুন, ফর্ম এবং বোতাম উভয়ই **নিষ্ক্রিয় হয়ে যায়** এবং একটি **স্পিনার উপস্থিত হয়।**
+* নেটওয়ার্ক অনুরোধ সফল হলে, ফর্মটি **লুকানো হবে** এবং "ধন্যবাদ" বার্তাটি **প্রদর্শিত হবে।**
+* নেটওয়ার্ক অনুরোধ ব্যর্থ হলে, একটি ত্রুটি বার্তা **প্রদর্শিত হবে**, এবং ফর্ম আবার **সক্রিয় হয়ে যাবে ।**
In **imperative programming,** the above corresponds directly to how you implement interaction. You have to write the exact instructions to manipulate the UI depending on what just happened. Here's another way to think about this: imagine riding next to someone in a car and telling them turn by turn where to go.
@@ -35,7 +34,7 @@ In this example of imperative UI programming, the form is built *without* React.
-```js index.js active
+```js
async function handleFormSubmit(e) {
e.preventDefault();
disable(textarea);
@@ -103,13 +102,13 @@ form.onsubmit = handleFormSubmit;
textarea.oninput = handleTextareaChange;
```
-```js sandbox.config.json hidden
+```js
{
"hardReloadOnChange": true
}
```
-```html public/index.html
+```html