Activity
Mon
Wed
Fri
Sun
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
What is this?
Less
More

Memberships

DP
Developer Pro

Public • 109 • Free

102 contributions to Developer Pro
React - Challenge #7 - Code Review
Hi @Cristian Florea @Basil Gubara, Just finished React challenge 7. Tried adding an extra feature which generates the list content instead of hard coding it into my code. Let me know your opinion. Thanks! https://codesandbox.io/p/sandbox/react-challenge-7-v-02-d33snf?file=%2Fsrc%2FApp.js%3A6%2C12
6
3
New comment 4d ago
1 like • 5d
Amazing work, specifically with using the if statements and pushing items into the array. Why don't you try to make it more interesting by using higher-order functions like map instead of creating an array and then using a for loop to push items into it?
1 like • 5d
it would be super easier
React Challenge #1 refactored
Hey @Cristian Florea and @Basil Gubara. Can I please get a review of my React Challenge #1. I made some changes to the code I posted first. Thank you all. https://codesandbox.io/p/sandbox/sign-up-form-v2-pv5stk
6
2
New comment 5d ago
1 like • 5d
Good job overall, the code is getting better. There is no need to create a component just to render an input field. The input can be used directly like this: ``` <input className="text-field" placeholder=''blah blah" value="Name" /> ``` Instead of using an opening and closing input tag. What you did with the Buttons is correct, so follow the same approach for the inputs. A better way to send the props for the two buttons is as follows: <Button text="Sign Up" /> <Button text="Sign In" isLight /> If the isLight prop is not sent, it defaults to false. Sending it as isLight means it is set to true.
React Challenge #1
Here is my first code review since starting React. All feed back is greatly appreciated. https://codesandbox.io/p/sandbox/sign-up-form-whgyt8 Thanks!!
5
6
New comment 5d ago
1 like • 6d
- Defining constants at the top of the code is not optimal. It's better to place them close to where they are needed/used. - When a prop is passed as a string, such as <TextField text={"Name"} />, there's no need to use {}. Instead, use <TextField text="Name" />. function TextLine(props) { return <p className={props.name}>{props.text}</p>; } function TextField(props) { return <input className="textField" placeholder={props.text}></input>; } - I understand you did this to improve the structure of your code, but the question is whether these minor adjustments are worth creating separate components for. Styles, as in <div className={${socialButton}}>, should be directly applied without storing them in a variable first. - You've created GoogleIcon, TwitterIcon, and FacebookIcon, which is not ideal. Consider making a generic component that can display any icon based on a prop, rather than creating a separate component for each icon. If you have 10 icons, will you create 10 components?
1 like • 6d
Also, please tag me in future PRs
React - Challenge #5 - Code Review
Hi Cristian, Finished React challenge 5. https://codesandbox.io/p/sandbox/react-challenge-5-3x55fv?file=%2Fsrc%2FApp.js%3A5%2C13
5
6
New comment 6d ago
1 like • 7d
Can you please mention me in future PRs
React - Challenge #6 - Code Review
Hi Cristian, Just finished React challenge 6. https://codesandbox.io/p/sandbox/react-challenge-6-7h35z9?file=%2Fsrc%2FApp.js%3A4%2C26
4
2
New comment 6d ago
1 like • 7d
Good work overall. However, I have one suggestion for improvement. Instead of hardcoding the options like this: ` <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> ` you can store the data in an array and map over it. This will make your code more maintainable and concise. For example: ` const options = [0, 1, 2, 3, 4, 5]; return ( <select> {options.map(option => ( <option key={option} value={option}> {option} </option> ))} </select> ); }; `
1-10 of 102
Basil Gubara
5
324points to level up
@basil-gubara-7211
A programmer...

Active 4h ago
Joined Feb 7, 2024
London
powered by