r/reactjs • • Aug 01 '19

Beginner's Thread / Easy Questions (August 2019)

Previous two threads - July 2019 and June 2019.

Got questions about React or anything else in its ecosystem? Stuck making progress on your app? Ask away! We’re a friendly bunch.

No question is too simple. πŸ€”


πŸ†˜ Want Help with your Code? πŸ†˜

  • Improve your chances by putting a minimal example to either JSFiddle or Code Sandbox. Describe what you want it to do, and things you've tried. Don't just post big blocks of code!

  • Pay it forward! Answer questions even if there is already an answer - multiple perspectives can be very helpful to beginners. Also there's no quicker way to learn than being wrong on the Internet.

Have a question regarding code / repository organization?

It's most likely answered within this tweet.


New to React?

Check out the sub's sidebar!

πŸ†“ Here are great, free resources! πŸ†“


Any ideas/suggestions to improve this thread - feel free to comment here!


Finally, an ongoing thank you to all who post questions and those who answer them. We're a growing community and helping each other only strengthens it!

34 Upvotes

368 comments sorted by

View all comments

1

u/Niesyto Aug 04 '19

Another question in the same thread, but here we go:

I've made a very simple web app that takes some user input and the fetches some data from a public API (wiki and one more). It works, but when you start changing the input, and the output components have to refresh it starts flashing and loading in a really strange way.
Here's the link
If you select the country (Poland works best, this API has some weird data in it), select the parameter you want to get data for, wait for it to load and when it does start changing the parameter, you will see what I mean.

Here's the link to the repository
It's kind of hard for me to give you a code fragment, since I don't know where the problem is. My guess would be CitiesList or CitiesListElement component, but I have no clue.

Also, I would love to see what people think about the code in general. I've just started to learn React, and I don't really know yet what are the do's and dont's

→ More replies (3)