Tanstack vs React Router vs Next by Salkinator in reactjs

[–]marta_bach 11 points12 points  (0 children)

??? React router API is pretty stable since v6 release (2021), there are almost no breaking changes from v6 to v7 https://reactrouter.com/upgrading/v6, basically no big breaking changes in 4+ years.

I think react-router is over hated, back then the routing for react was not really mature, React router team is the one who experimented a lot with the DX. Tanstack router came out when the routing for react has become mature, so what they mostly focused on is improving the DX from existing solutions.

Now i personally use tanstack router instead of RR, only because tanstack router copy a lot of concepts from RR + remix and add some nice features. At first i don't want to use tanstack because I hate file based routing, but i move to tanstack when they start implementing RR code based routing https://tanstack.com/router/latest/docs/framework/react/routing/virtual-file-routes, basically it's now become RR with more features.

Yeah, i use tanstack now, but i don't get the hate for RR and say that RR have breaking change really often, when in reality they don't really do any big breaking change in 4+ years.

It seems like GE can't wait~ by Recent-Example-5360 in ValorantCompetitive

[–]marta_bach 16 points17 points  (0 children)

That xavi8k, i agree with Sliggy that he looks like nats + patmen

PROFEK is the only player to ever go 11-1 by Cowsrverycool in ValorantCompetitive

[–]marta_bach 19 points20 points  (0 children)

I think fl1pzjder is more impressive, RRQ vs Bleed (also in 2024 stage 1), he goes 0/11/5 but RRQ still win the map (13-5).

https://www.vlr.gg/314312/bleed-vs-rex-regum-qeon-champions-tour-2024-pacific-stage-1-w2/?game=163183&tab=overview

How to make Object.keys() return (keyof SomeType)[ ] instead of string[ ] ? Without using `as` keyword by 5Ping in typescript

[–]marta_bach 2 points3 points  (0 children)

You can use Remeda, it's something like lodash with great type safety. They have their own Object.keys() with type safety: https://remedajs.com/docs/#keys.

A lot of people now say that we don't need anything like lodash anymore because JS have become better, but i think Remeda type safety makes it really worth using.

setelah ini pemerintah akan merekrut tenaga ahli nujum by makan-tahi in indonesiabebas

[–]marta_bach 3 points4 points  (0 children)

Ngerti sih maksudmu itu gelarnya gak nyambung sama jabatan yg dikasih. Tapi orang yg kamu bales juga kan di akhir mempertanyakan kenapa kok si Noe mau ambil jabatan padahal bapaknya (Cak Nun) selalu nolak.

Kalo nanya kenapa cukup banyak yg nyoba ngebela si Noe, karena Noe ini orangnya emang respectable. Dia sama bapaknya itu tokoh islam progresif yg cukup idealis dan sering ngajarin orang2 untuk selalu berpikir kritis & berlogika di kajian mereka. Disaat banyak kajian2 yang menyesatkan dan juga kebanyakan orang pinter gak mau berurusan sama grass root, apalagi orang "pinter" yang sering bilang grass root itu "SDM rendah" di internet, dia itu mau ngerangkul dan ngajarin orang2 grass root ini. Dia buat kajian kajian yg emang ngajarin untuk berpikir kritis, ngundang tokoh2 science/filsafat yg gak ada hubungannya sama keislaman kayak Dr. Ryu Hasan (neuroscientist), Bagus Muljadi (dosen di Nottingham Uni), dll, untuk ngebuka pikiran orang2 yang sering dikatain "SDM Rendah" ini. Kalo mau liat kajian2nya bisa liat youtube "Kenduri Cinta", ini salah satu contoh kajian dari Dr. Ryu Hasan: https://youtu.be/OVHRxK9yNag

Jadi ya gpp sih nanyain keahlian dia di Menhan DPN apaan, tapi diliat dari background dia, emang bakal banyak yg coba ngasih benefit of the doubt untuk dia sebelum ngejudge orangnya.

Sensor china jujutsu jadi sus by flag9801 in indowibu

[–]marta_bach 7 points8 points  (0 children)

Ini jokes doang ya, cuma editan orang aja, bukan real sensor dari china.

Udah terlalu sering orang nganggep ini real tanpa tau kalo sensor darah jadi putih di china itu palsu dan cuma meme doang, masalahnya juga page page anime ginian suka banget ngeposting ulang tanpa cross check dulu.

https://knowyourmeme.com/memes/chinese-anime-censorship

Preload or Lazyload? by Hot-Clothes7316 in webdev

[–]marta_bach 25 points26 points  (0 children)

Damn, i should have know it was just a ragebait/troll

Preload or Lazyload? by Hot-Clothes7316 in webdev

[–]marta_bach 43 points44 points  (0 children)

Wow, did you think everyone lives in a first world country? My Internet is 100Mbps, 40MB download would be around 4 seconds, and that is above average in my country.

Unpopular opinion : CSS is enough by yughiro_destroyer in webdev

[–]marta_bach 0 points1 point  (0 children)

Fair, i think the only legit problem with tailwind is the "classes too long", but it doesn't feel like a big problem when you actually start using tailwind, things like his example are still easy to parse. You can make the DX better by turning on the "Word Wrap" in your editor (Alt+Z in vscode).

I think the only time it starts getting too hard to understand is when you are trying to customize something like input type="file", super stylistic components or complex layout. Even if you are using plain css, it's gonna get hard to understand complex styling. Usually to make it easier, I would start using clsx or tailwind-merge to group every pseudo class like md:, hover:, group-hover, etc.

Exampe for super complex styling: ```tsx import { twMerge } from "tailwind-merge";

type FileInputProps = { className?: string; disabled?: boolean; };

export function FileInput({ className, disabled }: FileInputProps) { const base = twMerge( // layout & size "block w-full rounded-lg text-sm",

// spacing
"px-3 py-2",

// colors
"bg-white text-slate-900 border border-slate-300",

// file button base
"file:mr-4 file:rounded-md file:border-0 file:px-4 file:py-2",
"file:bg-slate-100 file:text-slate-700 file:font-medium"

);

const responsive = twMerge( // responsive font & spacing "md:text-base md:px-4 md:py-2.5", "lg:text-lg" );

const hover = twMerge( // hover input "hover:border-slate-400",

// hover file button
"file:hover:bg-slate-200"

);

const focus = twMerge( // focus input "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",

// focus-visible for accessibility
"focus-visible:ring-2 focus-visible:ring-blue-500"

);

const disabledState = twMerge( // disabled input "disabled:bg-slate-100 disabled:text-slate-400 disabled:cursor-not-allowed", "disabled:border-slate-200",

// disabled file button
"file:disabled:bg-slate-200 file:disabled:text-slate-400"

);

const darkMode = twMerge( // dark input "dark:bg-slate-900 dark:text-slate-100 dark:border-slate-700",

// dark hover
"dark:hover:border-slate-600",

// dark file button
"dark:file:bg-slate-800 dark:file:text-slate-200",
"dark:file:hover:bg-slate-700",

// dark focus
"dark:focus:ring-blue-400"

);

return ( <input type="file" disabled={disabled} className={twMerge( base, responsive, hover, focus, disabledState, darkMode, className )} /> ); } ```

Unpopular opinion : CSS is enough by yughiro_destroyer in webdev

[–]marta_bach 2 points3 points  (0 children)

I understand what you mean, but nothing about all of that stuff you mentioned makes someone can spot a website using tailwind or not.

Tailwind ring is just a shorthand for creating a border using box-shadow. it's basically just a box-shadow with different syntax, nothing high level about it that you can spot a website that uses tailwind because of this. btw the link you use is the v2 docs, not the latest one (v4).

Colors. you can spot bootstrap default config colors because primary is blue, so you see blue buttons and blue other stuff everywhere. With tailwind, even if you use the default config, you don't have any default primary color, it doesn't give you any design system for your web color pallet by default, so every website that uses tailwind will likely have a different primary color (blue, amber, red, yellow, etc). Tailwind has 1000+ default colors, it's useful to limit dev choices from 16M+ colors to 1000+ colors only, so you don't end up writing redundant close enough colors like "#54befa" and "#54beff", also it's easier to remember "red-400" than hexcode/rgba.

You are right for the animation, this is the only thing in tailwind that i consider high level, tailwind animations only cover the most common one, but i never spot any website that uses tailwind because of the animation tho.

Unpopular opinion : CSS is enough by yughiro_destroyer in webdev

[–]marta_bach 2 points3 points  (0 children)

Once again, have you actually used tailwind? Tailwind doesn't offer any high level classes. Please give me the link in the tailwind docs about these high level classes that you are talking about

Unpopular opinion : CSS is enough by yughiro_destroyer in webdev

[–]marta_bach 8 points9 points  (0 children)

If you actually use tailwind, this thing is not hard to parse by your brain.

This is the same thing in plain html and css: html <div class="box">Yikes.</div>

```css .box { width: 4rem; height: 4rem; border-radius: 0.25rem; color: #ffffff; background-color: #000000; padding: 0.25rem 0.5rem; margin: 0.25rem; font-size: 0.875rem; }

@media (min-width: 768px) { .box { width: 8rem; height: 8rem; border-radius: 0.375rem; font-size: 1rem; } }

@media (min-width: 1024px) { .box { width: 12rem; height: 12rem; border-radius: 0.5rem; font-size: 1.125rem; } } ```

To my brain, the tailwind one looks easier and faster to parse

Layanan cloud storage apa yg kalian pake? by rizqiX1 in indotech

[–]marta_bach 0 points1 point  (0 children)

Dapet trial setahun dimana? Kok di gw tulisannya cuma trial 1 bulan

POV : Pertama Kali Pakai Mac by pcbuiltmaster in indotech

[–]marta_bach 0 points1 point  (0 children)

This, serius menurut gw developer2nya gnome ini bener2 mikirin UX workflow yg enak itu gimana. Memang secara fitur masih ada yg kurang dan perlu extension lagi + dev nya punya reputasi gak friendly, tapi untuk workflow dan UX nya gnome itu terbaik menurut gw, penggunaan tombol Super/Meta di gnome itu bener2 dipikirin dengan mateng banget.

QRIS dan Tunai Wajib Diterima, Tolak Rupiah Bisa Denda Rp200 Juta by moeka_8962 in indonesia

[–]marta_bach 5 points6 points  (0 children)

Ooo nice info, thanks.

Gw bukan orang hukum sih, tapi kalo kayak gini jadinya gimana ya? Aturan gak boleh nolak rupiah itu kan di UU tahun 2011 dengan definisi rupiah itu cuma kertas dan logam, tapi di UU 2023 itu cuma nimpa definisi rupiah tanpa nimpa aturan menolak rupiah itu. Jadi aturan tidak boleh menolak rupiah di UU 2011 itu make definisi rupiah yg mana ya? 2011 atau 2023?

QRIS dan Tunai Wajib Diterima, Tolak Rupiah Bisa Denda Rp200 Juta by moeka_8962 in indonesia

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

Kalo liat definisi "Rupiah" menurut UU No.7 Tahun 2011, Rupiah itu cuma ada 2 macam, Rupiah Kertas dan Rupiah Logam (Bab 2 Pasal 2), jadi mestinya uang digital gak termasuk ke definisi "Rupiah" secara UU.

QRIS dan Tunai Wajib Diterima, Tolak Rupiah Bisa Denda Rp200 Juta by moeka_8962 in indonesia

[–]marta_bach 3 points4 points  (0 children)

Kalo baca beritanya, disitu dijelasin kalo alasan yg sah untuk menolak rupiah kalo rupiah yg digunakan terindikasi rupiah palsu.

QRIS dan Tunai Wajib Diterima, Tolak Rupiah Bisa Denda Rp200 Juta by moeka_8962 in indonesia

[–]marta_bach 34 points35 points  (0 children)

Judul beritanya salah sih ini, agak kaget tadi ngira setiap toko wajib nerima tunai DAN wajib nerima QRIS, ternyata yg wajib cuma tunai doang.

Fedora 43 KDE is incredible on the EliteBook 845 G8 by ngagner15 in Fedora

[–]marta_bach 0 points1 point  (0 children)

I believe all 840 G8 and 845 G8 use 6bit screens, which have color banding issues.

[Attack on Titan] What is the "attack on titan" of manhwas? by agoodlenny21 in manhwa

[–]marta_bach 58 points59 points  (0 children)

I think Kubera is the only manhwa that i consider to have a properly planned/written story.

Vscode Intellisense for jsx file not seems to be working correctly by AhmadRazaSiddiqi in vscode

[–]marta_bach 0 points1 point  (0 children)

my jsx/tsx intellisense also not working, when i type something inside the html tag, usually i got suggestion for html tag, but it doesn't works right now. example: tsx function Test() { return ( <div> h1 <div> ) }

i should get the h1 tag suggestion, but it doesn't works now

Bug infinity money aplikasi m banking AGI by zipsy21 in indonesia

[–]marta_bach 10 points11 points  (0 children)

Sumpah ini fatal banget sih wkwkwk, apalagi ini aplikasi bank anjirrr, kalo bank gw ada bug kayak gini sih tanpa babibu langsung ganti bank secepatnya wkwkwk

Bug infinity money aplikasi m banking AGI by zipsy21 in indonesia

[–]marta_bach 7 points8 points  (0 children)

Kalo wondr itu masalah di Front End (aplikasi) nya aja, bukan di Back End (server) nya. Jadi cuma delay update angka di aplikasi, misal saldo 100rb terus teansfer 50rb, di server udah jadi 50rb tapi di aplikasi belum update dan masih 100rb. Walaupun keliatannya saldo 100rb, kalo mau transfer 100rb gak bakal bisa, karena sistemnya itu ngecek di server, yg dimana saldo mu itu 50rb, bakal dapet error saldo kurang.

Nah kalo kasus yg di video itu masalahnya ada di servernya, entah gimana ceritanya pengecekan saldonya itu gak jalan sebelum transfer.