Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 14 13:02

    foxdonut on master

    Improve TypeScript support; fix… (compare)

  • Feb 14 12:51

    foxdonut on master

    update deps (compare)

  • Feb 14 12:50

    foxdonut on master

    update deps (compare)

  • Feb 13 15:38

    foxdonut on master

    update (compare)

  • Jan 28 02:18

    foxdonut on master

    working on router setup (compare)

  • Jan 27 11:25

    foxdonut on master

    working on router setup (compare)

  • Jan 24 01:52

    foxdonut on master

    working on router setup (compare)

  • Jan 23 01:00

    foxdonut on master

    working on router setup (compare)

  • Jan 17 22:19

    foxdonut on master

    working on router setup (compare)

  • Jan 17 22:07

    foxdonut on master

    working on router setup (compare)

  • Jan 17 20:39

    foxdonut on master

    working on router setup (compare)

  • Jan 17 13:09

    foxdonut on master

    working on router setup (compare)

  • Jan 17 11:52

    foxdonut on master

    working on router setup (compare)

  • Jan 16 21:40

    foxdonut on master

    working on router setup (compare)

  • Jan 16 21:40

    foxdonut on master

    working on router setup (compare)

  • Jan 12 01:35

    foxdonut on master

    working on router setup (compare)

  • Jan 10 12:14

    foxdonut on master

    working on router setup (compare)

  • Jan 09 18:54

    foxdonut on master

    working on router setup (compare)

  • Jan 07 01:11

    foxdonut on master

    working on router setup (compare)

  • Jan 03 18:14

    foxdonut on master

    working on router-setup (compare)

Barney Carroll
@barneycarroll
Redux & other internal mechanisms. As @orbitbot said vis React @ArthurClemens vis Solid, I think passing it through a transport layer built into the view library is necessary for a host of a priori unrelated concerns
One of them is nobody wants to do global view recomputations
So when you have an intermediary layer B in the A(B(C)) tree that shouldn't recompute, but C needs to recompute based on changes
Arthur Clemens
@ArthurClemens
With React: “how I do I make a state change update this component?” - if you don’t want to use Redux you quickly end up using Context.
Barney Carroll
@barneycarroll
Yeah, Redux necessitates Context under the hood, it's just that Context has recently become a first class public API now
Patrik Johnson
@orbitbot
depends on how far-fetching the scope of components and changes are
IME context is mainly used for configuration of app-wide stuff in 3rd party integrations, ie. theming and similar concerns, rather than just data passing here and there
I guess reaching for redux/mobx or something similar is fairly close to hand though, by which they enable avoiding context usage
Arthur Clemens
@ArthurClemens
Updating the language, make sure that the sub components get updated too.
Patrik Johnson
@orbitbot
I'd personally be pretty ok with prop-drilling for a few files/ component barriers, but dunno about your typical react dev
Barney Carroll
@barneycarroll
With the canonical style theme example, there's concerns related to the fact React targets non-DOM environments where styling needs to be built into components differently and the developer experience needs a way to persist changes in style that are purely part of the developer flow (get the app to a given state, then see how it looks in dark mode), and don't reflect actual application lifecycle concerns, but in functional terms this DX ends up indistinguishable from state management UX concerns, so they use the same transport mechanism
So in that case it's not that you want the ability to fork the tree like you might with state provision in eg list items, it's purely maintaining application lifecycle while flicking a global switch and ensuring persistence
Stephan Hoyer
@StephanHoyer
thanks
Barney Carroll
@barneycarroll
I think a large unspoken part of it is that esoteric performance optimisation concerns have been baked into React 3rd-party tooling & best practice so firmly as to be unconscious but simultaneously meta-tooling is to a huge degree about standard workflow developer experience expectations. These produce some esoteric contradictions that are difficult to rationalise, but context provides the hammer that flattens the screw.
Basically balancing aggressive shouldComponentUpdate => no while also ensuring that things like Redux dev tools & mobile native pseudo-CSS live-reload type stuff just works
James Forbes
@JAForbes
Yeah I guess arguably context helps with introspection for dev tools
Barney Carroll
@barneycarroll
It’s interesting seeing the post-vdom libraries implement it
Barney Carroll
@barneycarroll
It’s easier in the present historical context to see that as a ‘legitimate’ computation opt-out.
For all the initial performance hype, post-vdom still relies on this hierarchical component tree recomputation mechanism with lossy granularity. So if you need some contextual data updates but you don’t want the whole intervening tree to recompute, Context API makes sense
Barney Carroll
@barneycarroll
With meiosis, especially with seview, you’re opting out of the library-specific lifecycle idiosyncrasies, the call graph is much easier to see as plain functions with static view as a side effect. So I think the desire for Context is commensurate with the exoticness of your intrinsic underlying call graph — if the intrinsic lifecycle of your apps essential functions is inevitably complex, Context feels simpler.
James Forbes
@JAForbes
Yeah great point
Barney Carroll
@barneycarroll
Hey folks, I'm stumping myself somewhere silly here
Three things are confusing me
  1. The states map emits a stream, not the underlying value
  2. Even when I unwrap the stream, its underlying value is an empty object, even though I specified an initial value of {foo: 'bar'} in the scan
  3. When the router resolves, it pushes to update, but states doesn't emit
Fred Daoud
@foxdonut
@barneycarroll you forgot the scan: const states = m.stream.scan(merge, {foo: 'bar'}, update)
Barney Carroll
@barneycarroll
Hahaha thank you I was going mad
Fred Daoud
@foxdonut
welcome! :smile:
MikeJMontgomery
@MikeJMontgomery
Hey any chance someone can point me to examples of more extensive apps built following Meiosis pattern?
What would be ideal is a few full-stack apps that call a few API's together.
MikeJMontgomery
@MikeJMontgomery
BTW Im going through the examples repo, in case someone was going to point me there
Fred Daoud
@foxdonut
@MikeJMontgomery which examples have you looked at so far?
James Ramm
@JamesRamm
quick poll - what stream library do people tend to use?
I'm moving away from the basic stream in meiosis-setup, but the sheer number of libraries with essentially the same features (bacon, kefir, most, flyd, xstream) has me scratching my head. Not to mention that most of them don't seem to have much activity...
Barney Carroll
@barneycarroll
Mithril stream does everything I want it to
Constantin Angheloiu
@cmnstmntmn
i'm using flyd
Fred Daoud
@foxdonut
@JamesRamm flyd is solid and would be my choice. mithril stream works too but be aware of MithrilJS/mithril.js#2643.
Barney Carroll
@barneycarroll
Is that some kind of guard against infinite loops I wonder
James Forbes
@JAForbes
@foxdonut was there a higher order issue preventing that from being merged?
Patrik Johnson
@orbitbot
Missing PR in mithril's repo I guess...
Fred Daoud
@foxdonut
@JAForbes not that I know of..
James Forbes
@JAForbes
Ok cool good to know
MikeJMontgomery
@MikeJMontgomery
@foxdonut I have the examples repo on github and your tutorial site. I'm still learning js and your pattern so maybe I don't need other examples once I get my head around it all more. However, I've found from learning vue and other frameworks that tutorials often run short on more real world examples where services would be shared. Your pattern's composability seems to offer some value in this regard. If you don't have anything with shared services for public learning its cool. BTW I should mention I think your pattern's approach of simplifying SAM and incorporating streams is awesome. Exactly the sort of thing we need to get app logic out of frontend frameworks
Fred Daoud
@foxdonut

@MikeJMontgomery thank you for the kind words, much appreciated. always happy to hear that it is useful.

services would be shared

Could you tell me more about what you mean by "shared services"?

MikeJMontgomery
@MikeJMontgomery
Yea I think your sort of approach is the only logical way out of all the frameworks. It all boggles the mind and there's no end in sight with frameworks on backend and front-end
By shared services here's a few examples to get a sense of what I mean: using a search API with a data API service. Or linking an inventory API service and with an invoicing API service. Let me know if not clear.
Patrik Johnson
@orbitbot
I'm reading this as enabling writing state management that clearly doesn't require frontend framework intergrations to work?
MikeJMontgomery
@MikeJMontgomery
@orbitbot That's a fair characterization. My impression is Meiosis pattern could be used to compose services - and manage state - from the model. The goal is to get a generalized approach to developing on backend and front-end.
Fred Daoud
@foxdonut
@MikeJMontgomery definitely, Meiosis is about state management and data flow, it is not tied to the view or to any framework.
Not sure what kind of example you are looking for, but everything to do with Meiosis itself is that, so you could use it for shared services.
MikeJMontgomery
@MikeJMontgomery
@foxdonut Ok I'll dive into Meiosis and service composition some more. Will share any unique pearls of wisdom that come up
Fred Daoud
@foxdonut
:thumbsup: