silas

joined 3 years ago
MODERATOR OF
 

Hey all!

Let’s chat about Svelte runes to be introduced in the upcoming Svelte 5 update. This is a fairly significant change to Svelte that can give more power and organized code but renders some familiar Svelte syntax useless. Here’s the announcement article for reference and a dev vlog with some of the team for further listening.

  • So far, do you like runes or do you hate them?
  • What are the pros and cons?
  • Do you have any experience with similar syntax in other frameworks or languages?
 

According to the Bun blog and changelog, Bun now supports SvelteKit! Bun is an incredibly fast JavaScript runtime, bundler, transpiler, and package manager — all in one. Similar to using npm, here’s how you can start a SvelteKit project with Bun:

$ bunx create-svelte my-app
 

Where are you all finding details on what features are included in each version of lemmy-js-client?

 

I'm getting a "user_already_exists" error from /user/save_user_settings no matter what settings I try to change. The JWT is valid, and this is happening on multiple instances the same (programming.dev, lemm.ee, etc.) Anyone have any ideas why I'd be getting this? Here's my payload:

{
  show_bot_accounts: true,
  auth: token
}

Edit: This issue describes a bug where this happens when the avatar field is not included. Just tested it and that's the same problem I'm running into. I fixed it temporarily by passing the current avatar url.

 

I hope this is obvious, but I wanted to get it out there because of how important it is.

If your client allows user-entered Lemmy instances, ALWAYS verify that the instance is a valid Lemmy instance before sending credentials over. Otherwise, the user may have entered a url to an unknown server or site, and you will be sending their login credentials to a server that may be logging and storing the request or even intentionally trying to capture these credentials.

Instead, call getSite at the very least, or use a public list of verified servers before making the login request.

I would not be surprised if down the road malicious sites with similar domains to popular instances will be created to get login details of users who mis-typed their instance domain. It’s partially our responsibility to make sure our users are safe, so let’s keep this discussion going as we learn new ways to handle security concerns!

 

The official interactive tutorial was the way I initially learned Svelte, and it's seen some highly-impressive improvements over the past year. Perfect place to start if you're curious about Svelte!

What were the YouTube channels, tutorials, articles, or other resources that helped you learn Svelte?

 

Share them below!

view more: ‹ prev next ›