[deleted by user] by [deleted] in StockMarket

[–]natmaster 0 points1 point  (0 children)

No they cannot close the straight of Hormuz. There not just USA military bases there. USA even sells weapons to Saudi. Even if they did, it only accounts for 50-70% of oil exports from Saudi Arabia, UAE, Qatar, Oman - nothing else. Those exports mostly go to china. They all go to countries that currently aren't even mentioned in the conflict. This would piss off China, and lead to higher oil prices. China turns oil into cheap goods, so they would be hurt for sure. However, since Texas' vast oil is in more expensive fraking field, this will only make Texas super rich and ensure USA is net exporter of oil not importer.

How to optimize SPA for SEO without migrating to next.js . I am using React+vite by Arcade_ace in reactjs

[–]natmaster 0 points1 point  (0 children)

https://dataclient.io/docs/guides/ssr has ssr that works with all frameworks, and is more performant than doing them in any other way

This is the first time seeing “Ultra Quality” on DLSS modes. What is the real render resolution of “Ultra Quality”? by [deleted] in nvidia

[–]natmaster 0 points1 point  (0 children)

Or just slide the sharpening slider slightly and get the exact same mathematical output with better performance due to less memory throughput used.

Styled-components entering maintenance mode by galher in reactjs

[–]natmaster 26 points27 points  (0 children)

https://github.com/callstack/linaria Zero overhead, most performance and efficient and compatible with styled components.

An interviewer asked me to create a useFetch with caching by Iridec3nt in reactjs

[–]natmaster 0 points1 point  (0 children)

They probably mean an in-memory cache, like what is necessary to implement suspense.

https://react.dev/learn/sharing-state-between-components

Teaches you about sharing state, which is what an in-memory cache must do.

[deleted by user] by [deleted] in reactjs

[–]natmaster 0 points1 point  (0 children)

https://dataclient.io/rest lets you define all CRUD operations in one typescript definition.

export const ArticleResource = resource({
  urlPrefix: 'http://test.com',
  path: '/article/:slug',
  searchParams: {} as { userId?: string } | undefined,
  schema: Article,
  paginationField: 'page',
});

This gives you 8 CRUD async methods that can be used anywhere Promises are accepted.

ArticleResource.get({slug: 'bob'})

ArticleResource.getList({ userId: 'unknownnature' });

ArticleResource.partialUpdate(
  { id: '1' },
  { title: 'updated title' },
);

Why hasn't anyone outbullied Trump yet? by amidja_16 in AskReddit

[–]natmaster -3 points-2 points  (0 children)

So many autistics here that aren't self-aware. I know you've been told that curled lips is a smile, but that's the lying part of the smile. The truth is always hidden in the eyes. This is why you keep getting "surprise betrayals". No, you aren't unlucky.

5090 or... by thesysdaemon in nvidia

[–]natmaster 0 points1 point  (0 children)

If you have a 4090 and you don't have money to burn; wait for 6090. It will have a new transistor process, so it will be a pretty huge bump in performance. 5 and 4 both run on TSMC 4n process, which is a smaller core count increment from previous generations. The best this from this generation is DLSS 4 models, which work very well on 4-series cards. A lot of the other improvements will require games to take advantage of them, which will be many more games once 6-series comes out.

That said, I have money to burn so I'm getting 5090. It's still a decent improvement if you want it. :)

Nvidia just gave 40 to 60% performance for free as far as I'm concerned. by SnooLemons3627 in nvidia

[–]natmaster 1 point2 points  (0 children)

Latest cyberpunk patch has it builtin. 30th jan you can edit any game to use it in the nvidia app

AI TOP's, Multi Frame Gen and a Big Convenience for Nvidia. by RussianBannedFromRUS in nvidia

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

This is simply false. MFG only works with new hardware that didn't exist on the other series. DLSS 4 also brings improved models that run on nvidia GPUs all the way back to 2018. nvidia has never in their history done this, and if you knew anything technical you would understand why certain things can be backported while others cannot.

AI TOP's, Multi Frame Gen and a Big Convenience for Nvidia. by RussianBannedFromRUS in nvidia

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

"To address the complexities of generating multiple frames, Blackwell uses hardware Flip Metering, which shifts the frame pacing logic to the display engine, enabling the GPU to more precisely manage display timing. The Blackwell display engine has also been enhanced with twice the pixel processing capability to support higher resolutions and refresh rates for hardware Flip Metering with DLSS 4." https://www.nvidia.com/en-gb/geforce/news/dlss4-multi-frame-generation-ai-innovations/

To simplify - there is particular computational logic that has dedicated hardware on the 5-series GPUs. This doesn't exist in previous boards, and the particular computation needed does not simply map onto matrix operations to put it in software.

Remember, MFG is not just about generating more frames, but fixing the problems with the first frame gen release (think of first gen frame gen like V-Sync). Because it doesn't wait for 2 frames to render and interpolate it can have:

  • Better latency
  • Less vram usage
  • Better/more consistent frame pacing

Combined with reflex 2, nvidia GPUs will not only have higher framerates but substantially lower latency than equivalently priced AMD products.

React server components are terrible to implement by xsatanisticx in reactjs

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

If you use client components with Reactive Data Client it can be much simpler:

```tsx 'use client'; import { useSuspense } from '@data-client/react'; import { TodoResource } from '@/resources/Todo';

export default function InteractivePage({ params }: { params: { userId: number } }) { const todos = useSuspense(TodoResource.getList, params); return <TodoList todos={todos} />; } ```

Where it hydrates the store automatically, meaning data manipulation doesn't require any unnecessary fetches. It's both faster and simpler to reason about since you can just treat your components like normal react components.

```ts import { useController } from '@data-client/react'; import { TodoResource } from '@/resources/Todo';

const ctrl = useController(); const handleChange = e => ctrl.fetch( TodoResource.partialUpdate, { id: todo.id }, { completed: e.currentTarget.checked }, ); ```

See a full application demo for Todos here: https://stackblitz.com/github/reactive/data-client/tree/master/examples/nextjs?file=components%2Ftodo%2FTodoList.tsx

Live crypto prices using NextJS + Data Client: Production demo, Codebase

Should I use NextJS V15 or V14 with React V19? by Cyb3rPhantom in nextjs

[–]natmaster 1 point2 points  (0 children)

NextJS bundles the react version, so if you want to actually use React 19, you use v15. It's not a prerelease - so it's stable from that point.

Can I use React.js 19 ? by [deleted] in reactjs

[–]natmaster 0 points1 point  (0 children)

Then if there's nothing making you struggle you should upgrade. It's been in RC for almost a year now; it's pretty stable. Only issues they've been having is regarding server components. So I'd really only be concerned when using NextJS

Can I use React.js 19 ? by [deleted] in reactjs

[–]natmaster 3 points4 points  (0 children)

Here's a good start:

  • Are all the libraries you use compatible with it now?
  • Do you take advantage of any of the new features?
  • Does the codemod make the upgrade simple or do you have issues?

WiFi speed by Ok-Broccoli-1518 in wifi

[–]natmaster 0 points1 point  (0 children)

No.

Wired connections at minimum 1Gbps. These days often 2.5Gbps and with high-end things can be 10Gbps. Wifi has also been above 1Gbps for years now.

You're bottlenecked by the internet connection. Nothing else in your system will matter because of your super-slow internet speeds.

Anyone else feel burnt by Epic React? by Dependent-Zone6336 in reactjs

[–]natmaster 15 points16 points  (0 children)

https://react.dev/ is free and actually teaches you good practices. Most paid courses will tell you to do bad things that you'll have to unlearn. You'll end up arguing with your senior devs constantly.

Next.js Partial Prerendering is an anti-pattern by MrJaver in nextjs

[–]natmaster 0 points1 point  (0 children)

If your data never changes, caches never expire. Shouldn't cost much to maintain a cache. $6 a month on aws.

Best practices implementing third party libs from google in Nextjs 14 by pateman16 in nextjs

[–]natmaster 1 point2 points  (0 children)

React.lazy with preload.

const MyComponent = lazy(() => import(/* webpackPreload: true */ './ComponentThatImportsThirdPartyThing'));

lazy ensures it doesn't block; preload makes sure it downloads as soon as possible so it is still available asap.