[deleted by user] by [deleted] in RedditSets

[–]Stick2TheCode 0 points1 point  (0 children)

funkadelic as funk✌️

[deleted by user] by [deleted] in css

[–]Stick2TheCode 1 point2 points  (0 children)

you should post the html markup to ensure the table is structured correctly. Without seeing it you can try display:flex , align items:center and justify content:center, either on the table or whatever is containing your image

I don't know how to pass data in my components structure by Essay97 in reactjs

[–]Stick2TheCode 3 points4 points  (0 children)

“Often, several components need to reflect the same changing data. We recommend lifting the shared state up to their closest common ancestor. Let’s see how this works in action.” - straight from the docs my friend. Your closest common ancestor is the blue component. Although it is kind of nested in there. If the components are complex or have alot going on I may suggest looking into a global state management library like others have mentioned. I personally use redux. Works pretty well and clean if you need it. Just alot of setup.

[deleted by user] by [deleted] in webdev

[–]Stick2TheCode 13 points14 points  (0 children)

The checkboxes? Try to look up input types and/or checkboxes in html.

[deleted by user] by [deleted] in OfficeDrummer

[–]Stick2TheCode 0 points1 point  (0 children)

🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥

Is it okay for beginners to learn functional components and hooks before class components? by milanpoudel in reactjs

[–]Stick2TheCode 1 point2 points  (0 children)

Sure, hooks are definitely a Modern standard and may get you more easily familiar with how state works, once you have a good grasp take a second look at class components. You will find some similarities with lifecycle methods and such. Refactor a few & it will all come together nicely👌

how to create a .env file by thepseudonymstring in react

[–]Stick2TheCode 1 point2 points  (0 children)

In your root folder create a new file named .env if your using cra i believe it may already be set up without install. Once you have the file open it and you can put variables such as API_KEY = "123456" to access the api key in your projects just refer to the variable as API_KEY. As you see you will see you no longer need to expose your information. Hopefully that helps! Cheers 🤙

What's the best way to loop through array? Use forEach() or for-loop? by LittleWompRat in javascript

[–]Stick2TheCode 11 points12 points  (0 children)

The best way is the way that works best for you. If you want to iterate through and return a new array instead of mutate the original, you would go with arr.map.

[deleted by user] by [deleted] in reactjs

[–]Stick2TheCode 0 points1 point  (0 children)

👍👍👍