Group Group Group Group Group Group Group Group Group

Using 'Just' vs simply passing the value?

Quite possible that later on, the real usefulness of a Just publisher will become clear. But at the first introduction, I cannot think of a real use case where I would send a ‘Just’ instance, only to get its value back synchronously, rather than just sending the value itself.

Using Just: Create Just with “Hello” string, pass it, subscribe and get “Hello”
Using primitive: Pass an “Hello” string.

Point is, the first introduction in the book, it’s hard to make a case for the existence of a Just. Even a few hints will do. Apple docs mention Just can “start a chain of publishers”. Something like Just(myJust) I guess?

I’m probably just impatient, but I would love to see a real use case.

– Edit:
I guess that in the Combine world, Just is a convenient type conformance, where you need to return a publisher type and not a ‘String’.