Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
eliseumds
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
eliseumds
5y ago
It reminds me of a small coworking space I used in Sao Paulo, with three receptionists, a few "managers", lots of cleaning staff, someone doing just coffee, security, etc. They could do all of that with two employees total. In fro
62.
▲
by
eliseumds
5y ago
Same situation in Brazil at the moment, around 40% of the productive population working informally: https://agenciadenoticias.ibge.gov.br/agencia-noticias/2012-... . Uberization at an extreme level.
63.
▲
by
eliseumds
5y ago
It's not about loose or tight coupling, it's about things that React Context enables you do to. You're literally also hiding contextual data when using a partially-applied singleton, and you end up with code that is not safe
64.
▲
by
eliseumds
5y ago
Sorry if you felt talked down. I am lucky to have worked in some very big and complex React applications and will share more experience with you: * By using a singleton you're not able to easily test different LocaleData contexts in pa
65.
▲
by
eliseumds
5y ago
By reducing the surface area of a widely-used interface like a translation component/hook, you massively decrease the chance of generating bugs and fewer tests would bring you way more confidence. When testing, you just need to wrap th
66.
▲
by
eliseumds
5y ago
What's your programming background? This is some quite basic stuff to be honest. Have you heard of dependency injection? Context is dependency injection in React, there you go. There's quite a few .Net/Java books that would o
67.
▲
by
eliseumds
5y ago
It doesn't matter what your code is doing inside that component, you can still make it easily testable by having the core translation pipeline as pure functions. See https://news.ycombinator.com/item?id=27031847 for mo
68.
▲
by
eliseumds
5y ago
It is not that simple. You could use the exact module in different environments: browser, NodeJS, React Native. If you don't use context, you either need to do some very ugly module replacement at build time or duplicate your code. Als
69.
▲
by
eliseumds
5y ago
They're definitely more than simple functions if you look at it from the the entire application point-of-view. With components you have access to context and lifecycle. Doing: import someFunc from 'someFunc'; /&#x
70.
▲
by
eliseumds
5y ago
I beg your pardon? Even translation of pure text (and not numbers, date, currency) relies on locale data, like plurals and genders. It's just way more elegant to have this data inside a React context instead of importing a global trans
71.
▲
by
eliseumds
5y ago
It is indeed premature optimisation.
72.
▲
by
eliseumds
5y ago
I guess you misunderstood it. It has nothing to do with optimistic updates. Optimistic updates are about rendering results that you hope will happen, like clicking on a "Like" button and immediately making it bold and disabled eve
73.
▲
by
eliseumds
5y ago
It might be obvious to you. Hiding concrete implementations behind an elegant, easy-to-use interface, is not something we see every day. I've noticed countless codebases importing HTTP clients globally, mocking a ton of modules for tes
74.
▲
by
eliseumds
5y ago
https://brasil.estadao.com.br/noticias/rio-de-janeiro,telefe... https://istoe.com.br/447384_A+CICLOVIA+MAIS+CARA+DO+MUNDO/ http://www.ihu.unisinos.br/78-noticias/579871-o-desa
75.
▲
by
eliseumds
5y ago
Yes, it sounds low to me. In Brazil they've have spent 10x that and would never finish it.
76.
▲
by
eliseumds
5y ago
I don't want to go back. I feel more productive being a digital nomad, staying in a different city every month, meeting different people, eating different food, in different climates. I stay in the best neighbourhoods around the world,
77.
▲
by
eliseumds
5y ago
Correct.
78.
▲
by
eliseumds
5y ago
Plus effortless code splitting.
79.
▲
by
eliseumds
5y ago
Have you seen SvelteKit's source code? It looks like a toy project. [1] vite-plugin-ssr can't even be integrated with Vue Router (I saw you're working on deep integration though). They're both very rigid, early stage end
80.
▲
by
eliseumds
5y ago
The same organisation is putting pressure on Pfizer as well for lack of quality-control data: https://valor.globo.com/brasil/noticia/2021/04/26/impasse-co... (in Portuguese). It looks like it should
81.
▲
by
eliseumds
5y ago
I'd be dishonest if I told you I was able to compare them 1-to-1. I couldn't finish my Vite setup because of bugs and lack of proper SSR support. I believe that, at this point, people are just nitpicking. When working on a client-
82.
▲
by
eliseumds
5y ago
Precisely. I'd advise having esbuild behind Babel if you really need an specific Babel plugin, for ex: * Transform the file using esbuild first * Then use Babel with that one specific plugin (Loadable Components, Styled Components, Apo
83.
▲
by
eliseumds
5y ago
Vite is not a completely opinionated tool. You can still customise its behaviour and use plugins, so both installations would have very similar vulnerabilities at the end. For SSR, you need a self-written server entry point. Webpack 5 has i
84.
▲
by
eliseumds
5y ago
I literally just spent days trying out Vite and comparing it to Webpack 5, and I can comfortably say that they are in two very distinct leagues. It isn't fair to compare Vite to a CRA build with Webpack. You can greatly improve Webpack
85.
▲
by
eliseumds
5y ago
https://en.wikipedia.org/wiki/Double_Irish_arrangement
86.
▲
by
eliseumds
5y ago
Not only developers, literally anyone. I am shocked at the amount of time an average individual spends looking for solutions to everyday-life problems when I can find answers in seconds, it's crazy, and sad. I taught my family some mor
87.
▲
by
eliseumds
5y ago
Yes, but it does much less. There are still many projects out there relying on Babel plugins (Loadable Components, Styled Components, Tailwind, Apollo, etc). I love esbuild though, and use it a few of our packages, it flies
88.
▲
by
eliseumds
5y ago
Well, we can clearly see here that taste is indeed personal.
89.
▲
by
eliseumds
5y ago
I use Krisp on a daily basis from Brazil (a very noise country, terrible build quality) and it works incredibly well, better than most hardware-based solutions I've tried.
90.
▲
by
eliseumds
6y ago
Well, the server-side part of it needs to run somewhere. Looks pretty good to me, very straightforward.
More ›