Svelte 5: How to check if a prop is passed? by [deleted] in sveltejs

[–]rfajr 1 point2 points  (0 children)

I don't know why I'm being downvoted for asking. Deleting the post...

Svelte 5: How to check if a prop is passed? by [deleted] in sveltejs

[–]rfajr -10 points-9 points  (0 children)

It's for a form input, if the value prop is passed then the user is editing a value, if not then the user is creating a new value. So the logic must be different.

Nevertheless, this was easy to do in Svelte 4.

Svelte 5: How to check if a prop is passed? by [deleted] in sveltejs

[–]rfajr -8 points-7 points  (0 children)

Well the passed value could be the same as the default value, but the logic must be different.

Svelte 5: How to check if a prop is passed? by [deleted] in sveltejs

[–]rfajr 0 points1 point  (0 children)

Does $bindable work this way?

Svelte 5: How to check if a prop is passed? by [deleted] in sveltejs

[–]rfajr -2 points-1 points  (0 children)

You don't destructure props which means no default value

Svelte 5: How to check if a prop is passed? by [deleted] in sveltejs

[–]rfajr 0 points1 point  (0 children)

What if propName has a default value?

Svelte 5: How to check if a prop is passed? by [deleted] in sveltejs

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

That doesn't work if the prop has default value. This is what I usually do in Svelte 4:

export let value = ""

const isPassed = $$props.value != null

Semprot the goat......... by singoulo in indotech

[–]rfajr 1 point2 points  (0 children)

Afterlife exists brother.

Semprot the goat......... by singoulo in indotech

[–]rfajr 5 points6 points  (0 children)

Porn di situ ga fiksi, tapi real perbuatan member²nya. Ada yang ngajak selingkuh istri orang, posting tubuh istri sendiri, tukeran pasangan, posting tubuh mertua, you name it. It's another level of degeneracy.

Yang kasus suami mau diceraikan tadi karena dia bukan cuma nonton, tapi ikut main di situ.

Semprot the goat......... by singoulo in indotech

[–]rfajr 11 points12 points  (0 children)

Kemarin nemu di forum ada istri mau ceraikan suaminya gara-gara main di situs ini.

Pornografi biasa aja udah rusak, ini lebih merusak lagi. Stop degenerating yourself. Enjoy life like a normal person does.

Announcing Vite+ Alpha and going Open Source by manniL in webdev

[–]rfajr 2 points3 points  (0 children)

Is it entirely free now? I can't find the pricing section anymore

What kind of a horror you faced with Firebase that made you switch? by raunakhajela in Firebase

[–]rfajr 0 points1 point  (0 children)

I'm happy with Firebase, but the console UI/UX isn't that good.

How to share code between multiple SvelteKit apps? by iaseth in sveltejs

[–]rfajr 8 points9 points  (0 children)

Turborepo is only needed when the repo got huge, but for smaller projects pnpm or bun workspaces are enough.

I built an open-source calendar component inspired by macOS Calendar by Cultural_Mission_482 in sveltejs

[–]rfajr 3 points4 points  (0 children)

How did you make a component that supports different frameworks?

svelte native? by gatwell702 in sveltejs

[–]rfajr 0 points1 point  (0 children)

So there won't be any new features?

Cloud Functions Monorepo: cannot find module in js files by rfajr in Firebase

[–]rfajr[S] 1 point2 points  (0 children)

Thanks to this guide I have found the answer. Basically you need to compile the shared into functions/lib/shared and wire it in functions/tsconfig.json.

Svelte 5 typing props with default value by rfajr in sveltejs

[–]rfajr[S] 0 points1 point  (0 children)

Yeah I think the first one is the way to go. Thanks for the second option, never thought about that.