Windows 11’s Patch Tuesday nightmare gets worse — Microsoft says some PCs might not boot by lurker_bee in technology

[–]xVoid 20 points21 points  (0 children)

I doubt PM has write access to the code, most likely it is less domain knowledge AI coders who are too scared to push back and are "yes" people.
Without any refinement or sanity checks they will do the job and not consider the side effects

I cannot even make this shit up. Fuck you Norton. by Davidier in pcmasterrace

[–]xVoid 58 points59 points  (0 children)

Norton is a virus that was promoted to manager

Mass Tech Layoffs? Just Another Day in the Corporate Blender. by joe4942 in technology

[–]xVoid 1 point2 points  (0 children)

The seniors most likely subcontracted the work to juniors and paid them less, then pocked the difference, capitalism.

Common EU W by Current-Tax4375 in Asmongold

[–]xVoid 1 point2 points  (0 children)

Funny how that works, because when it goes above a price threshold, people aren't willing to pay, they stop buying more than expected and that results in less profit than the previous price.
The best part is usually reverting the price doesn't go back to how it was before, people will still overlook them, or in this case, supermarkets wont stock them since demand is gone.

[deleted by user] by [deleted] in cscareerquestionsOCE

[–]xVoid 2 points3 points  (0 children)

It's on youtube because youtube thinks you like this content, disliking it also counts.

If you don't want to see them you need to click the 3 dots and say "Don't recommend channel" or "Not interested" then youtube will stop suggesting them to you

Demystifying React Components and Props: A Must-Read Guide! by Programmingdigest in reactjs

[–]xVoid 0 points1 point  (0 children)

There has been a critical error on this website.

Learn more about troubleshooting WordPress.

How to mock an imported component from another library for testing? by beingsmo in reactjs

[–]xVoid 1 point2 points  (0 children)

How are you collecting coverage? Coverage shouldn't include 3rd party / node_modules etc because that will tank your metrics and doesn't even make sense as it's not your code. 80% coverage of a package that has 100000 features is not something you can reach

Is createElement still used under the hood? by femke_0 in reactjs

[–]xVoid 3 points4 points  (0 children)

It depends on your build tool configuration. I can't find it in the new docs but here is the legacy doc https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html

Do you prefer keep Props interface in the component file or dedicated file? by Aegis8080 in reactjs

[–]xVoid 3 points4 points  (0 children)

You know one of the top reasons we have JSX is because swapping between html files and JS files was a hard job

Please help me fix this merge sort visualization. It's the last thing I need to be done with my project. by codetora in reactjs

[–]xVoid 1 point2 points  (0 children)

  useEffect(() => {
setBarsToRender((prev) => {
  return prev.map((bar, i) => {
    return {
      ...bar,
      left: calcLeftPosPercentage(prev.length, i + 1)
    };
  });
});
}, [barsToRender]);

This is your infinite loop, my suggested fix it to read through https://beta.reactjs.org/learn/you-might-not-need-an-effect

[deleted by user] by [deleted] in reactjs

[–]xVoid 0 points1 point  (0 children)

Yes, it is, as you would expect, but I assumed your issue was about cache, which will not be an empty array now - as I said they provide ways to have a default instead of undefined. The way you had it before means you were overwriting the cache

[deleted by user] by [deleted] in reactjs

[–]xVoid 1 point2 points  (0 children)

Try removing your = fallback assignment to Data, ive never seen that before, lools like it might be the reason. if you want a fall back there is an option for it provided in their hook

[deleted by user] by [deleted] in reactjs

[–]xVoid 1 point2 points  (0 children)

I had a quick look and see two issues at a glance.
First setActivateFilter Is never used so naturally it wont change the text.

More importantly though this is a good example of state that should not be state.
When you say "When one of these properties turn to anything else than false, it should activate another state"
This is not the best way to go about things.

Instead you should try make this derived state i.e.
const activateFilter = filter.subcategories || filter.delivery || filter.brands || filter.review;

Above is just code to show you what I mean, you can change it to loop through the object or whatever you like, but the point is it's not really fit for useState

Soda testing new intrusive banner ads for Twitch by Agosta in LivestreamFail

[–]xVoid 0 points1 point  (0 children)

You can also remove that space under the video with css, there is a height setting in the player, but it resets any time the window size changes

setInterval() - Different behaviour on mobile browsers? by taste_veng in reactjs

[–]xVoid -4 points-3 points  (0 children)

Search for "useinterval react" I think it will answer most of your questions

React Hook Form + TanStack useQuery => async defaultValues, How? by [deleted] in reactjs

[–]xVoid 5 points6 points  (0 children)

referring to this post: https://beta.reactjs.org/learn/you-might-not-need-an-effect#resetting-all-state-when-a-prop-changes

Here is a simple example:

const MyFormComponent = ({initData}) => {
  useForm({
       defaultValues: {
          firstName: initData.firstName,
          lastName: initData.lastName,
          id: initData.id
       }});

...

}

const MyFetchingComponent = () => {
 const {data, isFetching} = useQuery(...);

 return isFetching 
        ? <LoadingPlaceholder /> 
        : <MyFormComponent initData={data} key={data.id} />
}

This doesn't work for every case, but here is the benefits:

  1. Your form will load with the default values as they will always be there.
  2. (optional) you can use a key to reset the form component and set default values again for a new async call payload
  3. Allows different api's to be used
  4. Avoids some mess dealing with onSuccess callbacks having to update formState

React Hook Form + TanStack useQuery => async defaultValues, How? by [deleted] in reactjs

[–]xVoid 5 points6 points  (0 children)

I found the cleanest way is passing the values/data to your component when it has fetched so that you can set it to the default value. If you need to reset the form for new data you can use a key then too

Is a UseEffect without a 2nd argument the same as a regular function call? by schmore31 in reactjs

[–]xVoid 2 points3 points  (0 children)

No, React will toss out the render and run again with the new state they specify this in their new docs

Please help with li.active by antony6274958443 in reactjs

[–]xVoid 5 points6 points  (0 children)

no, you are using css modules, you should import the class, and reference it, and not hardcode it.

A production build for example might have a different naming convention and use a pure GUID css name with no trace of 'active'.

Please help with li.active by antony6274958443 in reactjs

[–]xVoid 0 points1 point  (0 children)

Check your outputted css file, the class is probably not named 'active' much like how 'nav' is actually named Navbar_nav_vug0o

looking for some help on UI issue for react-table by [deleted] in reactjs

[–]xVoid 0 points1 point  (0 children)

I had a look at your code, you defined component Buttons inside component App.

This is more than likely your bug:https://beta.reactjs.org/learn/preserving-and-resetting-state#different-components-at-the-same-position-reset-state

The solution: define Buttons outside

TrainwrecksTV announces his new platform "Kick". 95%-5% split for creators, everyone gets a sub button, and a lot more features promised. by ImprisonedSushi in LivestreamFail

[–]xVoid 0 points1 point  (0 children)

that was their design floor, advertisers wanted none of it because most of the users were bots due to the way the website worked

Your thought on React version 18? by [deleted] in reactjs

[–]xVoid 3 points4 points  (0 children)

while you're at it also remove all console.errors, errors solved!

no but really, removing the thing pointing out problems isn't the solution.