ai on main
Fix nano-staged config (compare)
ai on main
Update CI, dependencies and lin… (compare)
ai on main
Update CI config (compare)
ai on main
Update dependencies (compare)
ai on main
Fix spelling check (compare)
ai on main
Promote Vite instead of Parcel Update dependencies (compare)
ai on main
Fix remark plugins (compare)
ai on main
Update dependencies Add ignore-scripts to yarn in D… Move from Yarn to pnpm (compare)
ai on main
Adds recipe about deployment (#… (compare)
ai on main
Clean up dependencies (compare)
ai on main
Updated example of Logux Server… (compare)
Hi there, I'm new to logux and have a question. Is there a way to send data to the client when the action is processed?
f.e. I have a create entity action, the server process the action, creates an entity in the DB, broadcasts entity created action to all connected clients. But also I want to send the new entity back to the action sender client to redirect it onto the new entity page. Any ideas?
ctx.sendBack(action, meta)
(ctx
is a first argument in server.type
callbacks)
logux/processed
action and ctx.sendBack
method, but is there any api/hack to get the data from the server process method
in the client's .sync
result? I know that it's possible to send back to the client a new action with the created entity, I can even add the original action id to the new action to wait this action on the client. But this looks a bit dirty...
IndexedStore
, the order
parameter in calls to client.log.store.get()
is no longer optional, and I get a TypeError: (destructured parameter) is undefined
. From all the code, it should be optional, but it isn't and WebStorm arrives at the conclusion that it isn't, although I don't know how it does. I can reproduce this in JS as well. And it's not an issue with MemoryStore... Not a major issue, mind, just very odd.
sendMessage
)
quick question - does anybody know if logux "just works" in a browser extension? (i.e. using
sendMessage
)
Not too familiar, but I'd check out
https://logux.io/web-api/#crosstabclient
Then you can just listen for messages and in the handler add them to the log(?)
client.log.add({ type: 'logux/subscribe', channel: 'users/14' }, { sync: true })
client.log.add({ type: 'logux/unsubscribe', channel: 'users/14' }, { sync: true })
nanostores
, since it was a renaming from logux/state
if i'm using CrossTabClient
from @logux/client
, with IndexedStore
, and i've installed using the command npm install @logux/core @logux/client nanostores
... is it good/bad/ugly to use nanostores
as well? it feels like a smell if i use it directly, if i try to have my authoritative state live in Logux (CrossTabClient
, IndexedStore
), but also have separate usage of nanostores.
but i'm using Svelte, and the nanostores README makes a lot of sense to me. so i'm trying to figure out - can I use nanostores the way it's outlined in the nanostores README, but use it together with CrossTabClient
?
local
and sync
. The regular batch
util coming with react-redux
does not really help with that. And it seems to me that when dispatching all actions just one by one (without await
), there is a lot of time-travel going on.room/:id/ENTERED
hey! I'm a frontend dev, so I apologize if this is a stupid question. I'm wondering if I can use Logux without creating a backend for it? (personal project)
I have a frontend & a postgres db (supabase), and it supports WS connections. But I've gotten this far without having to make a backend... so I was wondering if maybe there was a way to use/wrap the proxy server on the frontend so I wouldn't need a whole separate thing.
Any examples on logux/redux? Trying logux out with a counter app. I have two clients and for some reason one of the clients doesn't always update its state when reconnecting from offline mode. For example, when I disconnect both clients from internet and I decrement twice on client A and increment 3 times on client B, then when I reconnect, only one of the clients update correctly while the other one doesn't update at all. Changes from both clients do get applied at server.
Looking at ws traffic I can see both clients send actions done while it was offline to the server, and the server responds with "logux/processed" to them, but then it only replicates those actions to Client A and not Client B..
addSyncMap()
which is a really great addition to handle sync-maps! All works fine but I noticed that finished actions like tasks/changed
are send to clients that should not receive them. Here https://github.com/logux/server/blob/main/add-sync-map/index.js#L14 it seems that only the sending client is excluded by default so that they are send to all clients or channel subscribers? How can we control who receives these actions?
Hi everyone, I have a question about CRDT.
Suppose I have an Array<string>
field like [1,2,3]
User A wants to insert 'a' after 1
User B wants to insert 'b' after 2
The desired final result should be [1, 'a', 2, 'b', 3]
Can the above behavior be done with the changeSyncMap
API?
//A
changeSyncMap(store, { arr: [1, 'a', 2, 3 ] })
// B
changeSyncMap(store, { arr: [1, 2, 'b' , 3 ] })
notion
does not use a CRDT to handle conflicts though.listBefore
listAfter
listRemove
operators to handle array behavior