Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 10 06:45

    ai on main

    Fix spelling check (compare)

  • Jan 10 06:42

    ai on main

    Promote Vite instead of Parcel Update dependencies (compare)

  • Dec 23 2021 23:41

    ai on main

    Fix remark plugins (compare)

  • Dec 23 2021 23:37
    ai commented #90
  • Dec 23 2021 23:36

    ai on main

    Update dependencies Add ignore-scripts to yarn in D… Move from Yarn to pnpm (compare)

  • Dec 23 2021 23:24

    ai on main

    Adds recipe about deployment (#… (compare)

  • Dec 23 2021 23:24
    ai closed #90
  • Dec 22 2021 17:49
    vitalybaev synchronize #90
  • Dec 22 2021 16:39
    vitalybaev edited #90
  • Dec 22 2021 16:38
    vitalybaev opened #90
  • Nov 21 2021 17:58

    ai on main

    Clean up dependencies (compare)

  • Sep 28 2021 20:35
    ai commented #89
  • Sep 28 2021 18:01
    vitalybaev commented #89
  • Sep 28 2021 17:26

    ai on main

    Updated example of Logux Server… (compare)

  • Sep 28 2021 17:26
    ai closed #89
  • Sep 28 2021 17:26
    ai commented #89
  • Sep 28 2021 17:24
    vitalybaev opened #89
  • Sep 27 2021 12:20

    dependabot[bot] on npm_and_yarn

    (compare)

  • Sep 27 2021 12:20

    ai on main

    Bump ansi-regex from 5.0.0 to 5… (compare)

  • Sep 27 2021 12:20
    ai closed #88
Neville Franks
@getclibu_twitter
Following on this is also manifesting with an issue on the server where both tabs have disconnected and the server is in a "connect" - "timeout" endless loop. ie.
LoguxError: A timeout was reached (20000 ms)
    at FilteredNode.syncError (file:///c:/webapps/clibuNotes/node_modules/@logux/core/base-node/index.js:225:15)
    at Timeout.<anonymous> (file:///c:/webapps/clibuNotes/node_modules/@logux/core/base-node/index.js:253:12)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  type: 'timeout',
  options: 20000,
  description: 'A timeout was reached (20000 ms)',
  received: false,
  connectionId: '31'
}
Ben Teichman
@effervescentia
Hi logux community! 🤘 I'm happy to have stumbled across your corner of the internet!
I am curious if there are any established patterns for "awareness" information, specifically for high-throughput information such as cursor location where the clients don't need to be notified of their action being distributed to other clients and no history state is required just applying a LWW algorithm
Ben Teichman
@effervescentia
Furthermore I'm waiting to hear back from the team currently but curious if anyone here has any details on the feature set that is available with the "pro" server? I'm guessing some sort of leader election / action re-broadcasting on server peers via redis based on one of the jsdoc comments for the Server options to allow for a setup with multiple servers for redundancy
2 replies
Neville Franks
@getclibu_twitter
Prior to Logux v0.10.0 we could specify a Server.loadOptions( .. { reporter: () => {} } to stop console output. With v0.10.0 reporter has changed to logger and so far I haven't found a way to stop this going to the console. How can I accomplish this?
4 replies
cosminv6u
@cosminv6u
Hi, I want to play a little bit with logux/state , is there any documentation or example I can use? I saw something in the readme on git, but seems not enough
4 replies
Brian Dombrowski
@bdombro
I've been messing around with Logux for a day and am having a really hard time just getting something working. Is there a complete, full-stack, react template or demo I could look at?
Brian Dombrowski
@bdombro

I've got most of it working except I can't get useFilter to work for the life of me. It just always returns an empty array and isEmpty = true.

Oh, and I couldn't figure out how to submit a mutation

Jeremy Dombrowski
@meatflavourdev
that's my last name!🤯
Brian Dombrowski
@bdombro
OMG!!!!!!!!! HI DUDE!
Jeremy Dombrowski
@meatflavourdev
haha 😜 We should go buy lotto tickets, it's that kind of day.
hmm looked around for an example... can you post ur useFilter code
Side note: I've changed the pronounciation back from the Westernized Dom-brow-ski to something more like Dom-brov-ski.. I think it sounds classy. 😂
Andrey Sitnik
@ai
@bdombro we are working on the example right now
Check out server log, does server return actions back to the client (with meta.clients).
Now, that we didn't add a guide for SyncMap and useFilter yet. You should use only examples in API
Brian Dombrowski
@bdombro
image.png
Ya we should! Here is a link to my WIP example -- https://github.com/bdombro/logux-react-demo/blob/main/client/src/Todos.tsx#L21
8 replies
Brian Dombrowski
@bdombro
Btw, have y'all thought about scalability yet? I was wondering how hard it would be to scale past a single server, and suspect it would be very hard due to the websockets and server-centralized diff engine
9 replies
Evgeny Zaytsev
@z4o4z

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?

Andrey Sitnik
@ai
@z4o4z by default, Logux Server already send logux/processed action when client’s action was processed
If you need another action (for instance, to send back some data) use ctx.sendBack(action, meta) (ctx is a first argument in server.type callbacks)
Evgeny Zaytsev
@z4o4z
hey @ai, yeah I've seen the logux/processed action and ctx.sendBackmethod, 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...
Zoso der Goldene
@ZosoDerGoldene
Hi there, also new to Logux and enjoying the ride so far (the documentation might be reworked a bit for newcomers & typescript, I'll write something up as soon as I'm a bit farther on the learning curve). I came across an issue, though, and don't know how to debug it further. I'm building a React/Redux/Logux/Prisma app, and I'm trying to add the useAuth() hook. I don't have conflicting versions of React (17.0.2 everywhere) or React and the rendered, I don't violate the Rules of Hooks (call it top level, function component, first thing, etc.):
function Login() {
let {isAuthenticated, userId} = useAuth()
console.log(isAuthenticated)
and still, I get an "Invalid Hook Call" - as this only happens with the useAuth() Hook and not others - any way to investigate this further?
45 replies
Zoso der Goldene
@ZosoDerGoldene
Hello again, everything's working for me now. I stumbled upon a minor issue, though, that I seem unable to debug. When I use 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.
4 replies
Michael Floering
@floering:matrix.org
[m]
quick question - does anybody know if logux "just works" in a browser extension? (i.e. using sendMessage)
(i'm testing this myself, but asking in the meantime 🙂)
Jeremy Dombrowski
@meatflavourdev

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 })
"IndexedStore to store Logux log in IndexedDB" sounds handy.
https://github.com/logux/client
Michael Floering
@floering:matrix.org
[m]
@meatflavourdev: 👍️ thank you for the tips!
Michael Floering
@floering:matrix.org
[m]
have a question about nanostores, since it was a renaming from logux/state
Michael Floering
@floering:matrix.org
[m]

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?

3 replies
Michael Floering
@floering:matrix.org
[m]
Cool, makes sense to me. Thank you much!
Dominik Picker
@DaDom
Hi!
I have a question about executing actions in batch:
Imagine I would like to dispatch multiple actions in one go, and those might even be a mix of 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.
Is there a recommended way how to handle that?
9 replies
Jules ➐
@legarsjules_twitter
Hello, I would like to use logux with nanostores like app state manager. I would like to know if I need to implement time travel system when receive undo or if an implementation like for redux or vuex was developed ?
17 replies
Dominik Picker
@DaDom
Hi!
Is there a way to use encodings like gzip or brotli for the websocket communication?
If not, what would be the best place to inject something like that?
Thanks a lot!
4 replies
fx
@dynamitec.fs:matrix.org
[m]
I am evaluating Logux at the moment and wonder if it is also possible to do a replay of previous events as with a read model in classic CQRS/ES.
1 reply
fx
@dynamitec.fs:matrix.org
[m]
I want to regenerate the current state after changes.
2 replies
fx
@dynamitec.fs:matrix.org
[m]
:point_up: Edit: I want to regenerate the current state after changes how actions are processed - replaying all previous events.
Is that easier to understand?
:point_up: Edit: I want to regenerate the current state after changing how actions are processed - replaying all previous events.
:point_up: Edit: I want to regenerate the current state after changing how actions are processed - replaying all previous actions.
Ilya Radchenko
@knownasilya
Can types be contained to a channel? Seems like a missed opportunity for contextual/grouped types.
6 replies
Ilya Radchenko
@knownasilya
Where do people host their logux server?
1 reply
Eduard Aksamitov
@euaaaio
Any hosting or server with Node.js >=14 support
Ilya Radchenko
@knownasilya
Has anyone gotten it working on cloudflare functions?
10 replies
Eduard Aksamitov
@euaaaio
Maybe it’s possible to use Logux on Vercel like express.js: https://vercel.com/guides/using-express-with-vercel
But only just for dev, tests or fun 😅
Ilya Radchenko
@knownasilya
I'm working on a side project so that fits lol. Though wanted to do it in cloudflare, but vercel might be fine for now.
Ilya Radchenko
@knownasilya
Should server.type('...' be able to match on a pattern? server.type('room/:id/END_MOVE'?
Ilya Radchenko
@knownasilya
Seems like no. This would be a nice way to limit actions to a channel and not need to pass an id in the payload.