3 ms·
The one thing I don't like which doesn't make sense on my part. If I need to make a change in React it is usually not easy because oft he different state(s) inv
by ge96 7y ago
The one thing I don't like which doesn't make sense on my part. If I need to make a change in React it is usually not easy because oft he different state(s) involved.
So if I have to add a new modal/modify the workflow, it's a process.
"I could just do it" it it was straight Dom manipulation and direct data handling but I get why that can be bad as well.
I am also not an expert but it could just be that I'm doing it poorly. For example cross communicating between components so I click on some button that had to rerender a parent group to show a modal inside or something, which again sounds like bad design. But that's what I've been "annoyed" with. Oh and the walls of warnings about useEffect or something not being mounted yet/apply change.
- schwartzworld 7y agoif you're seeing walls of warnings about useEffect, or having trouble adding a modal to your app, then you probably ARE doing it poorly, no offense intended. It takes a while to really grok top-down data flow and how react components should be structured, but when you do it's magic. As to useEffect, try not to use it. It's mainly for when you need to touch something completely outside the React tree.
- ge96 7y agoThat's interesting your point about useEffect. I mean I am using it because I'm using the functional way to build things vs. class. I'd prefer the class way honestly so I can just use the regular lifecycles eg. didMount/willMount/etc... I did figure out how to fix the issues eg. prop depedency, but it is kind of annoying when anything inside the useEffect triggers the warnings. Most recently I had a mobile app I had to make and it had a navbar/body/bottom navbar. I built the app split in three, so the navbar/bottom navbar took the routes to render what is shown, similar to the body... but this caused communication issues eg. you click on a thing in the bottom navbar, affects something in body and something renders/updates in the top navbar too. yeah my architecting can use work I don't deny that. Generally though it's the whole "action causes re-render" that I'm not 100% with but again probably goes back to architecture.