+ 1
React JS
Hello I am working on a small application to practice, I am currently stuck. I have a counter in a component file which value I want to use in my main file. How can I transfer that information to be accurate and the same one?
4 Respuestas
+ 5
Share your code please
+ 5
I created a simple counter component for you.
Check it out from https://codesandbox.io/s/simplecountercomp-czltr
+ 1
I just changed some index.tsx to make the component show from App
https://codesandbox.io/embed/pokesearch-49sdi
0
Sorry for the late response,
https://codesandbox.io/s/pokesearch-kndum
I am not sure how to use codeandsanbox, however here is my code. What I want to do is use the counter on my pokemonSearch.tsx file in my app.tsx file so I can do the username and then print the number of pokemons he has found! which in this case is the counter.
Thank you!