nikokozak

nikokozak

Svonix - Svelte & Phoenix > 1.6 - easily create and use Svelte components in Phoenix

Hello all,

I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed successor to Sveltex given that it’s been more than two years since any updates have been rolled out (Phoenix 1.6 is not supported), and because I couldn’t find any other libraries for integrating Svelte components with Phoenix views in a pleasant manner.

So far it’s been a real pleasure to use, with minimal (if any) pain points. It even includes a mix task that runs most of the tedious setup.

This is my first real attempt at a library, and I would love any help from others interested in Svelte + Phoenix integrations. I’ve been building it as I work on another project, and have been pretty lax regarding testing given that I’m not sure how to even go about testing a lib for Phoenix.

Other than that, I hope people find it useful - so far I’ve loved the productivity boost of being able to quickly integrate Svelte whenever more interactivity is called for, while still being able to use Phoenix views for most of my static content.

Have a lovely day!

Most Liked

nikokozak

nikokozak

@cpgo Just updated the lib to use ESBuild - thank you for the suggestion, recompilation is much snappier!

kingdomcoder

kingdomcoder

You might want to check this project out.

https://github.com/arlac77/svelte-websocket-store

LostKobrakai

LostKobrakai

I like the thought of a svelte SPA (possibly with node or deno on the server-side), but having a phoenix API as well as a svelte store implementation, which uses channels to sync data with the SPA similar to liveview, but as you said, kinda in reverse.

Where Next?

Popular in Announcing Top

mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story <- Meeseeks.all(html, css("tr.athing")) do...
New
josevalim
EDIT: since Ecto 3.0 final version is out, this post was amended to use the final versions in the instructions below. Hi everyone, We a...
New
tmbb
I’ve been working on two packages (not on hex.pm yet) to build admin interfaces for phoenix apps: bureaucrat - which contains a bunch ...
New
blatyo
The best overview for how things are tied together is this presentation. Modules and functions are pretty well documented at this point, ...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
sbs
Only 650 LOC, wrote for fun :slight_smile: https://github.com/sunboshan/qrcode
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
versilov
Could not wait for the missing Elixir ML libraries to appear, so, I wrote one myself, taking https://github.com/sdwolfz/exlearn as a foun...
New
achempion
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library. The progre...
New
archan937
It is a well-know topic within the Elixir community: “To mock or not to mock? :)” Every alchemist probably has his / her own opinion con...
New

Other popular topics Top

axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48342 226
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31265 143
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54120 245
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement