@codercontent: React interview question. Star Rating. Greatfrontend #programming #coding #softwareengineer #javascript #typescript #reactjs

CoderContent
CoderContent
Open In TikTok:
Region: GB
Thursday 12 February 2026 11:00:00 GMT
20862
986
14
25

Music

Download

Comments

dosjshzhhff
dosjshzhhff :
If you want to go the extra mile you should think of the user experience. A hover state and the set state for the star rating should be visually distinct. The user needs to know that the change occurred on click not on hover so for example if the 2 star was selected already and the mouse hovers on the with star, stars 1-2 are filled, and stars 3-5 are now filled with a more transparent yellow which transitions to the full yellow on click.
2026-04-05 04:44:39
0
lenndery
Lennert De Ryck :
Why use JS for hovering if we have CSS??
2026-02-23 05:56:59
2
obaro__
Obaro :
You could have an array of stars, a star would just be an object with 2 properties: ratings and isChecked. Render the array, pass the rating as data-* use the isChecked property to either fill or not fill the star. Set onClick for each star: reset all isCheck property to false first then loop through the array, if the rating is less than or equal to the rating of the clicked star, set isChecked to true.
2026-07-08 00:30:11
0
dyjocqwf6ejw
Santiago R. :
To be honest the last part took me by surprise, I mean, I knew it was all about having the 2 states (the real and the hover one) but the Array mapping just got me. Nice video btw
2026-02-14 00:50:10
3
rudycito23
rudycito23 :
You need to talk about study habits. To my chagrin, I would fail a tech interview.
2026-02-12 11:08:11
2
nawe.alvarez
nawealvarez :
why reinvent the wheel?
2026-03-01 23:59:25
1
piotrcan
🇨🇦 PiotrCAN 🇨🇦 :
That's funny, I created a quite similar widget many years ago..these days reach, Vue, and Angular have made it much simpler.
2026-02-15 16:13:21
1
molymolymoly3
holymoly :
ask claude
2026-02-18 23:48:53
1
mikaeelmikz
Mikaeel :
Watashi wa stahhh
2026-02-12 11:27:01
4
To see more videos from user @codercontent, please go to the Tikwm homepage.

Other Videos

السلام عليكم ورحمة الله وبركاته 👋🏻 متابعينا الكرام ✨  🏕️ وصلت خيمة التخييم السداسية الجديدة... خيار ممتاز للرحلات، البحر، البر والكشتات. ✅ مميزاتها: 🔹 تصميم سداسي أنيق وواسع.  🔹 4 نوافذ مزودة بشبك ناموسية للحماية من الحشرات.  🔹 بابان مع شبك ناموسية للتهوية الممتازة.  🔹 مقاومة للمياه 🌧️ والرياح 🌬️ وأشعة الشمس ☀️.  🔹 تأتي مع مواثق وحبال تثبيت لثبات أكبر.  🔹يتوفر معها عمودان لرفع الباب وتحويله إلى مظلة للاستراحة.  🔹 تأتي داخل شنطة حمل لسهولة النقل والتخزين. 🔹 سريعة التركيب جداً، حيث تأتي أجزاؤها متصلة ببعضها، ولا تحتاج أكثر من دقيقة تقريباً للنصب. 📏 المقاسات: ▪️ 2.10 × 2.10 متر ▪️ الارتفاع: 1.40 متر 💯 خيمة عملية ومريحة، مناسبة للعائلات، رحلات البحر، التخييم، والجلسات الخارجية. حتلقوها متوفرة في محلات اجوان للمعدات الصناعية ولوازم الورش ✨ يوجد خدمة توصيل لجميع المدن الليبية 🚗 🇱🇾 للطلب او الاستفسار عبر بريد الصفحة أو على الوتس اب على الأرقام التالية : فاضل : ‏‪‏‪0923235722‬‏‬‏ عبداللَّه : 0923622488 #اجوان #اجوان_للمعدات_الصناعية #اكسبلور #خيمة #تخييم
السلام عليكم ورحمة الله وبركاته 👋🏻 متابعينا الكرام ✨ 🏕️ وصلت خيمة التخييم السداسية الجديدة... خيار ممتاز للرحلات، البحر، البر والكشتات. ✅ مميزاتها: 🔹 تصميم سداسي أنيق وواسع. 🔹 4 نوافذ مزودة بشبك ناموسية للحماية من الحشرات. 🔹 بابان مع شبك ناموسية للتهوية الممتازة. 🔹 مقاومة للمياه 🌧️ والرياح 🌬️ وأشعة الشمس ☀️. 🔹 تأتي مع مواثق وحبال تثبيت لثبات أكبر. 🔹يتوفر معها عمودان لرفع الباب وتحويله إلى مظلة للاستراحة. 🔹 تأتي داخل شنطة حمل لسهولة النقل والتخزين. 🔹 سريعة التركيب جداً، حيث تأتي أجزاؤها متصلة ببعضها، ولا تحتاج أكثر من دقيقة تقريباً للنصب. 📏 المقاسات: ▪️ 2.10 × 2.10 متر ▪️ الارتفاع: 1.40 متر 💯 خيمة عملية ومريحة، مناسبة للعائلات، رحلات البحر، التخييم، والجلسات الخارجية. حتلقوها متوفرة في محلات اجوان للمعدات الصناعية ولوازم الورش ✨ يوجد خدمة توصيل لجميع المدن الليبية 🚗 🇱🇾 للطلب او الاستفسار عبر بريد الصفحة أو على الوتس اب على الأرقام التالية : فاضل : ‏‪‏‪0923235722‬‏‬‏ عبداللَّه : 0923622488 #اجوان #اجوان_للمعدات_الصناعية #اكسبلور #خيمة #تخييم
Gas ⛽️ or Trash 🗑️? Healthy Thin Mint Cookies 🍫 🍪  Girl Scout cookies walked so these macro friendly Thin Mints could run 😮‍💨 Minty, chocolatey, crunchy… and dangerous to keep in the freezer because they disappear fast. Macros🔥 (per cookie, makes 7 to 8) Calories — 240 Protein — 5g Carbs — 18g Fat — 18g Ingredients 🥣 Cookies: 🍪  180g or 1 1/4 cups almond flour 20g or 1/4 cup cocoa powder 4 tbsp or 30g maple syrup 2 tbsp or 28g melted coconut oil 1/2 tsp peppermint extract Pinch of Salt  Chocolate Coating: 🍫  150g or ~6 oz of no sugar added dark m chocolate 1/2 tbsp or 7grams  coconut oil 1/4 tsp peppermint extract How to make: 1️⃣ In a bowl, mix almond flour, cocoa powder, and salt. Add maple syrup, melted coconut oil, and peppermint extract, then stir until a dough forms. Chill in the fridge for 30 minutes or freezer for 15 minutes.  2️⃣ Roll dough between parchment paper, cut into thin cookie rounds, and bake at 350F for 8 to 10 minutes. Let cool completely. 3️⃣ Melt chocolate with coconut oil, stir in peppermint extract, dip each cookie until coated, then place in the fridge or freezer until the chocolate hardens. 4️⃣ Enjoy. Keep stored in freezer.  Verdict: Certified Gas ⛽️ Honestly… these look like the healthier cousin of a Girl Scout Thin Mint that still tastes like dessert. Keep them frozen and thank me later 🔥 Original Video: @Ruth Anne Bigley  #highproteinrecipes #mealprepideas #fitnessfood #gasortrash #healthyrecipes
Gas ⛽️ or Trash 🗑️? Healthy Thin Mint Cookies 🍫 🍪 Girl Scout cookies walked so these macro friendly Thin Mints could run 😮‍💨 Minty, chocolatey, crunchy… and dangerous to keep in the freezer because they disappear fast. Macros🔥 (per cookie, makes 7 to 8) Calories — 240 Protein — 5g Carbs — 18g Fat — 18g Ingredients 🥣 Cookies: 🍪 180g or 1 1/4 cups almond flour 20g or 1/4 cup cocoa powder 4 tbsp or 30g maple syrup 2 tbsp or 28g melted coconut oil 1/2 tsp peppermint extract Pinch of Salt Chocolate Coating: 🍫 150g or ~6 oz of no sugar added dark m chocolate 1/2 tbsp or 7grams coconut oil 1/4 tsp peppermint extract How to make: 1️⃣ In a bowl, mix almond flour, cocoa powder, and salt. Add maple syrup, melted coconut oil, and peppermint extract, then stir until a dough forms. Chill in the fridge for 30 minutes or freezer for 15 minutes. 2️⃣ Roll dough between parchment paper, cut into thin cookie rounds, and bake at 350F for 8 to 10 minutes. Let cool completely. 3️⃣ Melt chocolate with coconut oil, stir in peppermint extract, dip each cookie until coated, then place in the fridge or freezer until the chocolate hardens. 4️⃣ Enjoy. Keep stored in freezer. Verdict: Certified Gas ⛽️ Honestly… these look like the healthier cousin of a Girl Scout Thin Mint that still tastes like dessert. Keep them frozen and thank me later 🔥 Original Video: @Ruth Anne Bigley #highproteinrecipes #mealprepideas #fitnessfood #gasortrash #healthyrecipes

About