ThisisJackRyan / Friendly-Betting

This is a betting web app with react and possible backend where you can make bets in on real life topic not just sports
1 stars 0 forks source link

Change Props to a destructuring assignment #20

Open ThisisJackRyan opened 3 months ago

ThisisJackRyan commented 3 months ago

I have kinda got into a little bit of a nasty habit where, I just slap props onto my component like this:

Image

This means to access any of my parameters, I would need to do this props.parameter While this works, it leaves the code more messy and is very hard to know what parameters I need when adding a component to a new location. I am also trying to utilize "children" or "slots" better which only adds to the confusion.

The task of this issue is to convert all of the examples props. To looks something like this:

Image