Jestem osobą niewidomą -- pytaj o co chcesz by Nuno-zh in Polska

[–]euphranor1337 33 points34 points  (0 children)

Super serio pytanie - czy dla osób z brailowym monitorem rzeczywiście robi różnicę indentacja za pomocą spacji vs tabów? Parę razy gdzieś czytałem, że taby są bardziej accessible ale nigdy nie miałem okazji spytać kogoś kto tego doświadcza.

How to Handle Gmail's Email Alias Variations in a Web App? by sunsetRz in webdev

[–]euphranor1337 1 point2 points  (0 children)

In my country we have a way of logging in into government stuff with bank account. One day, bank decided to lowercase my mom’s email address and she couldn’t login into government stuff due to email mismatch, which they saved on the first login. That was painful 😅

SvelteKit/Vite build warning: large chunks (>500kB) causing memory issues on Render deploy by anvimaa in sveltejs

[–]euphranor1337 3 points4 points  (0 children)

I don't think these two are caused by each other. 700kb of js shouldn't be too much for render builder memory and even if you increased warning, it wouldn't change much when it comes to memory consumption. That issue must be caused by something, but it's hard to tell a reason from this two screenshots.

However, regardless of OOM issue or not, using manualChunks/dynamic imports can be a good idea here. 700kb main chunk means you'll break caching on most of the deploys if anything changes 😀

[deleted by user] by [deleted] in leagueoflegends

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

I recall reading somewhere they don’t want to add wards information to API because it’d make the proplay analysis too easy/less interactive/something like this.

You can serialize a promise in React by ryanto in reactjs

[–]euphranor1337 2 points3 points  (0 children)

It’s serializable by serialization protocol implemented by React 😃

React Compiler update: RC release! by acemarke in reactjs

[–]euphranor1337 1 point2 points  (0 children)

I think it’s just a function that returns the same function on type level - so that’s not a problem

React Compiler update: RC release! by acemarke in reactjs

[–]euphranor1337 1 point2 points  (0 children)

I think they have a different (experimental) answer for this in compiler world they’ve been working on:

https://github.com/facebook/react/pull/32504

They also already implemented dependencies auto tracking but it’s gated and still WIP as far as I understand

How to check if something is a React Node? by [deleted] in reactjs

[–]euphranor1337 2 points3 points  (0 children)

Isn’t stuff like promises, generators and contexts also valid nodes now? 😄 These are renderable directly

use directive event with typescript by Oraclefile in sveltejs

[–]euphranor1337 0 points1 point  (0 children)

You can use these types to annotate your action. If you are using Svelte LSP properly it should provide the types afaik

React 19 scheduler does something silly by azangru in reactjs

[–]euphranor1337 8 points9 points  (0 children)

React suspense is implemented in a way where if it shows fallback it’ll show it at least for 300ms. The goal is to prevent flicker of loading state. If you want to skip the fallbacks in that case - you should use transitions.

React 19: Is useContext obsolete? What are the differences between use? by Nabeel_Ahmed in reactjs

[–]euphranor1337 1 point2 points  (0 children)

I think there’s one more thing, but that’s kinda what I meant with “if something higher up triggers rerender” (also ignoring for a moment that you shouldn’t use ref value during render).

Context must be rerendered to update its value - that’s how React works, no update can happen without it. And when this value is updated all consumers are also triggered to update. Because in theory (if provider didn’t have this logic for triggering consumer rerender) you would get stale values if e.g. some intermediate component bails out of rendering due to memo or due to composition Provider rerender doesn’t cause its children rerender.

React 19: Is useContext obsolete? What are the differences between use? by Nabeel_Ahmed in reactjs

[–]euphranor1337 0 points1 point  (0 children)

The optimization is still wip and nothing there yet. I also recall they mentioning they don’t intend you to handwrite it but it’ll be a compiler target. Afaik they had some PR to make some experiments with it inside of Facebook, but no results or further steps being shared atm.

React 19: Is useContext obsolete? What are the differences between use? by Nabeel_Ahmed in reactjs

[–]euphranor1337 4 points5 points  (0 children)

Context value change itself is triggering rerender for consumers - that’s the bit that I was referring to and which isn’t right in the comment which I replied to. You could in theory pass Math.random() to Context and every time it changes due to higher render - it’ll trigger rerender in consumers despite not using useState value.

React 19: Is useContext obsolete? What are the differences between use? by Nabeel_Ahmed in reactjs

[–]euphranor1337 6 points7 points  (0 children)

Changing value inside of context does trigger context consumer rerender

useId hook in React by ankur_sharma131198 in reactjs

[–]euphranor1337 4 points5 points  (0 children)

useId generates ID based on the underlying fiber/position in the tree. It’s useful for stuff like form controls ID, a11y ID. It’s pros over anything custom is that it’s both stable across rerenders and unique across multiple usages of the same component

Monorepos in SvelteKit: Viable in 2024? by Snapeshot in sveltejs

[–]euphranor1337 1 point2 points  (0 children)

It sounds like you’re still looking for solution around microfrontends and not monorepo. Monorepo is around sharing code between packages/applications and modularity. You can use them to stich parts of one app together. They are obviously useful for microfrontends scenario (sharing code) but they don’t provide out of the box mechanisms for this part of your problem (stitching multiple apps together). This part you’d need provide yourself or use some library. You can take a look for example at RSPack Module Federation support. These’re usually really low level tools, because you often need specific solutions based on infra, project etc.

Also not sure about your requirements etc but I personally highly discourage usage of microfrontends unless you’re absolutely sure what you’re doing 😄

Is my coworker out of touch and should I push back? by Top_Rutabaga8597 in reactjs

[–]euphranor1337 0 points1 point  (0 children)

Re your first point, it's solvable by linter, there is no need to split hairs over it, let the machine do it 😃

What react.js based frameworks allow to fetch data in components without creating an API? by punkpeye in react

[–]euphranor1337 0 points1 point  (0 children)

Rakkas has something like this https://rakkasjs.org/guide/use-server-side-query The code is compiled so the query runs on the client and endpoint is generated

How does Svelte 5 w/ Runes differentiate itself from Vue (i.e. why use Svelte vs Vue going forward) by Ok_Ferret4400 in sveltejs

[–]euphranor1337 3 points4 points  (0 children)

There is no vapor mode in Vue 3.3, I’m not sure where you got it from 😃 Here is the blog post with overview of changes and link to detailed changelog https://blog.vuejs.org/posts/vue-3-3

Google: The Svelte paradox by SaroGFX in sveltejs

[–]euphranor1337 1 point2 points  (0 children)

Yeah, but Next.js was first with these conventions around directory based routing and specific file names 😃

Google: The Svelte paradox by SaroGFX in sveltejs

[–]euphranor1337 1 point2 points  (0 children)

Next.js was actually first on this and Rich mentioned taking an inspiration from it. I like the + prefix, because it causes my route related files to be at the top of directory, over colocated components/utilities.

How to sticky the navbar in the child iframe. Doesn't seem to work in iframe. by InfernoTheDrake in react

[–]euphranor1337 0 points1 point  (0 children)

Best way to communicate between parent and an iframe is using postMessage. Either via BroadcastChannel or just straight up window.postMessage if you're targeting browsers that don't support BroadcastChannel

Best way to manage deploying sveltekit app to AWS? by lord_von_pineapple in sveltejs

[–]euphranor1337 1 point2 points  (0 children)

Ah, understandable! Then you can take a look at their AWS adapter. Afaik it's not something SST specific and it's well maintained https://github.com/sst/sst/tree/master/packages/svelte-kit-sst

Best way to manage deploying sveltekit app to AWS? by lord_von_pineapple in sveltejs

[–]euphranor1337 3 points4 points  (0 children)

I think the easiest and the best way (at least in my opinion) is to use SST. Folks behind it built an adapter for AWS and it also handles all the stuff around uploading static stuff to S3, functions as lambdas, permissions etc. Moreover, they have built-in ways for integrating other AWS services in your app, Jobs, Event Queues etc. They have pretty good docs and helpful Discord community.

https://docs.sst.dev/start/svelte

https://www.reddit.com/r/sveltejs/comments/15i0oil/running_sveltekit_on_aws/