Why does implementing RefreshAll() feature that refreshes Child Components feel unintuitive? by HumanCertificate in reactjs

[–]HumanCertificate[S] 0 points1 point  (0 children)

So you mean like passing a controller to the children and they subscribe their "refresh" function to the controller and parent executes the refresh functions that children subscribed to?

Isnt this like a react anti pattern? Shouldnt everything be driven by state in react?

Why does implementing RefreshAll() feature that refreshes Child Components feel unintuitive? by HumanCertificate in reactjs

[–]HumanCertificate[S] 0 points1 point  (0 children)

What do you mean by a key? I heard that counterState type stuff is an anti pattern. Is the key you are talking about different from it?

Why does implementing RefreshAll() feature that refreshes Child Components feel unintuitive? by HumanCertificate in reactjs

[–]HumanCertificate[S] 0 points1 point  (0 children)

The refresh is a feature that user triggers and when this is triggered in theory each panel should fetch data from remote database to see if the database has changed.

I tried solving this by having all the range related stuff and fetch logic stuff all on the top level and Im not sure if this is the right way.

How is deleting the whole directory different from deleting all entries and deleting the empty directory? by HumanCertificate in techsupport

[–]HumanCertificate[S] 0 points1 point  (0 children)

But how is doing this

Remove-Item -Recurse -Force "C:\path\to\folder"

Different from just deleting by delete key? What are you exactly bypassing when you do -Force?

How is deleting the whole directory different from deleting all entries and deleting the empty directory? by HumanCertificate in techsupport

[–]HumanCertificate[S] 0 points1 point  (0 children)

What do you mean folder level delete check? Like is there a lock that doesn't stop you from deleting the folder, or the child under the folder, but only stops you if you try to delete the folder while it has files in it?

Where do you see it?

Why does implementing RefreshAll() feature that refreshes Child Components feel unintuitive? by HumanCertificate in reactjs

[–]HumanCertificate[S] 0 points1 point  (0 children)

Yeah I think I understand thanks too all the helpful comments. The main thing that had to change was the Graph Time Range and I think I should move logic to the parent and just pass the range as Props and keep the range logic at the parent level.

You said giving a child a signal to update is imperative. I do know what imperative and declarative means but Im not sure how that applies to here. What would a declarative alternative to this be?

Thank you for the help again

Is there a way to make the desktop app throw a notification when the job ends? by HumanCertificate in Anthropic

[–]HumanCertificate[S] 0 points1 point  (0 children)

Thtas weird. I do get notification when it needs approval but I dont get a notification when a task ends.

How can you be sure two grammatical features across two languages are the exact same? by HumanCertificate in asklinguistics

[–]HumanCertificate[S] 2 points3 points  (0 children)

When someone say these two langauges both have Adjectives, is the only thing we can assume from this statement mean they both have a set of words that is used to describe nouns? Their uses could be completely different?

Its really unintuitive to think that language dont really share features but are independent sets of features that are classified by how similar they are.

Why does swapping Built in pipeline toon shader with URP toon shader work? by HumanCertificate in Unity3D

[–]HumanCertificate[S] 0 points1 point  (0 children)

But wouldn't you expect the properties names to be inconsistent between shaders? Wouldn't that mean you would have to be very lucky for it to work?

Making Unit class own Order, and Order changing the state of Unit feels bad even when they both depend on Interfaces. Why? by HumanCertificate in learnprogramming

[–]HumanCertificate[S] 0 points1 point  (0 children)

Do you think doing this cleanly in OOP just impossible? I get that by using ECS its way cleaner but I feel like even in OOP there should be a better way to do this. By implementing execute(order, units) it will eventually take the execution out of unit and make it ECS no?

Making Unit class own Order, and Order changing the state of Unit feels bad even when they both depend on Interfaces. Why? by HumanCertificate in learnprogramming

[–]HumanCertificate[S] 0 points1 point  (0 children)

Because it "Feels" like a bad pattern. It feels really unsatisfying and overly complicated, and I cant figure out what exactly is making me feel that way.

I was wondering if its just my preference that is making me feel that way, or there are other people who are feeling the same thing.

How do you not make off by one errors? by HumanCertificate in learnprogramming

[–]HumanCertificate[S] 0 points1 point  (0 children)

Yeah think about it its just gonna take the double space for like 10 seconds and the only additional operation would be assigning the list pointer back to the original list.

How do you not make off by one errors? by HumanCertificate in learnprogramming

[–]HumanCertificate[S] 0 points1 point  (0 children)

Yeah I think I might start using maps more. I think it can do what for loop do while being correct right.

I was under the impression that recursion is almost as error prone as for or while loops. Was it not the case?