ai on main
Update README.md (#91) (compare)
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)
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
client/common/mapActions.ts
, and want to import it from server/index.ts
. What's the best way to do this?
new Server()
for each and subscribe to their Node IDs?
I just discovered Logux and it looks very nice so far!
I'm wondering: Would Logux be suitable for a project that has a lot of state updates? We would have some kind of live monitoring of connected devices (up to 200) which send a status updates to the server every 100ms (every device on its own, so you'd have a state update in the server probably every 4ms or so), which then need to be distributed to the client.
Is there some kind of throttling logic to consolidate certain state updates and only send them out every ~100-200ms?
Hi everyone, I've been building an app with Logux and it's been awesome. I'm trying now to implement file uploads, and I wanted to keep them outside of the Logux state so that I didn't have large payloads in the event history. However I'm struggling to get Redux thunks working at all with Logux.
I add in the Redux thunk middleware like so:
const createStore = createStoreCreator(client);
const store = createStore(
reducer,
composeWithDevTools(
applyMiddleware(
thunkMiddleware.withExtraArgument({ serverAddress: httpServerAddress })
)
)
);
But when I try to dispatch
a thunk I get this error:
Uncaught (in promise) Error: Expected "type" in action
at Log.add (index.js:47:13)
at store.dispatch (index.js:63:11)
at Object.drop (App.tsx:61:11)
at DropTargetImpl.drop (DropTargetImpl.ts:30:16)
at determineDropResult (drop.ts:53:35)
at drop.ts:23:23
at Array.forEach (<anonymous>)
at DragDropManagerImpl.drop (drop.ts:22:13)
at Object.drop (DragDropManagerImpl.ts:50:34)
at HTML5BackendImpl.handleTopDrop (HTML5BackendImpl.ts:724:16)
This implies to me that either (a) Logux doesn't support thunk payloads at all and always requires a plain object with a type
field or (b) I'm somehow not adding the middleware correctly.
Has anyone tried this before / have any pointers?