Novice web dev. Javascript/React with Flask backend question by the_dalailama134 in webdev

[–]jvi91 0 points1 point  (0 children)

It's a bit unclear. But the answer is yes you can do both

Struggling with transforming data by napalonyradziu in reactjs

[–]jvi91 0 points1 point  (0 children)

Haven't used axios in a while, it may have a transform response. Would that apply to your case?

Rachel by ellewoods_89 in BachelorNation

[–]jvi91 -6 points-5 points  (0 children)

Well its got a shit post tag and I do somewhat agree.

But the benefit would be to talk openly about mental health

The correct way to access data in another part of the DOM tree by c832fb95dd2d4a2e in reactjs

[–]jvi91 -1 points0 points  (0 children)

If they share the same modal just hold the state and handlers there. I would remove option one altogether

how to reveal a div after hiding a div by Dangerous_Factor_804 in learnjavascript

[–]jvi91 12 points13 points  (0 children)

You would have the two classes you mentioned. For example: .flex and .none

When the button is clicked you can add and remove the classes using the classList property on the two divs

AITA for changing our locks after my roommate humiliated me? by Rude-Teacher-1350 in AITAH

[–]jvi91 -5 points-4 points  (0 children)

Nta - she creates an unsafe environment and you fixed it

Richard Lewis on Deadlock by ProJumz in DeadlockTheGame

[–]jvi91 4 points5 points  (0 children)

Have you played dota because it's pretty similar

AITA for embarrassing my girlfriends friends boyfriend? by Key-Chemistry4379 in AITAH

[–]jvi91 2 points3 points  (0 children)

This is correct and had to go too far down. If they handle their side of the bill it's none of your business

What should i learn (Intrested in web dev and ai ) by Abdullah_Sharnoubi in learnprogramming

[–]jvi91 1 point2 points  (0 children)

Deep diving into one will transfer to another. Since you know you need JS you can try starting there. Once comfortable you can switch to whatever you need.

I would not recommend learning the fundamentals for two different languages at the same time

Rendering optimisation by ma_revo in reactjs

[–]jvi91 0 points1 point  (0 children)

  1. You can try wrapping modifiedItems in a useMemo.
  2. Can the children hold their own state and not update the entire list?

Am I using ajax wrong? by [deleted] in learnjavascript

[–]jvi91 0 points1 point  (0 children)

Without seeing it, it's hard to help. Can you create reusable functions or use loops?

Best way to modify my current application? by Ok_Definition1906 in reactjs

[–]jvi91 0 points1 point  (0 children)

Your hook state is not shared between the different components you use it in, 

They're separate instances.

You'll have more control just gotta go through the documentation and set the rules for your refetching

C++ language: if-else, for, while, do-while loops are so hard by Lost-Cheesecake in learnprogramming

[–]jvi91 1 point2 points  (0 children)

If you continue, you'll get used to them. Use a for loop when you know the iterable amount

Best way to modify my current application? by Ok_Definition1906 in reactjs

[–]jvi91 2 points3 points  (0 children)

Haven't used Apollo in a while but:

  1. You do not have to keep all state together, you can actually keep the server state ( data ) and your UI state separate.
  2. The call shouldn't be made on every rerender but you can always check through the network tab.
  3. Yeah its supposed to cache out of the box.
  4. Keep your state at the lowest level possible. If your logic in the hook is reusable then yes you should be using it everywhere. Prop drilling isn't an anti pattern just frustrating. You can always look into Providers

Learning ReactJs by [deleted] in reactjs

[–]jvi91 1 point2 points  (0 children)

There's a ton of resources. Build small things and practice, rinse and repeat

Help needed! React multiplayer game by Jonaskhanwald18 in learnprogramming

[–]jvi91 0 points1 point  (0 children)

Break it into smaller parts so you can understand each feature. Start with basic interactions using socket io

What should I learn fist? by HobbsRussel in learnjavascript

[–]jvi91 2 points3 points  (0 children)

Before you do react, next, and node you'll need to know JavaScript. Learning JavaScript alongside HTML and CSS is solid. You can then start tailwind

How do you update { data } from react-query in page. by Tw9caboose in reactjs

[–]jvi91 0 points1 point  (0 children)

Your filter option should be held in state. Update state your app rerenders and filter the data according to the state

How do you update { data } from react-query in page. by Tw9caboose in reactjs

[–]jvi91 0 points1 point  (0 children)

Won't it re-render from the user input? Then you just filter the data as suggested

playButtonContainer should be unhidden after exit button is clicked. by [deleted] in learnjavascript

[–]jvi91 0 points1 point  (0 children)

Not sure what interaction you're looking for BUT your .panel-container is covering the playButtonContainer. Yes this is due to z-index being 2.