3 Comments
User's avatar
alezhur's avatar

Do you plan to publish the mock-signal-store package on npm?

Expand full comment
Sir0xb's avatar

withComputed(({ selectedPage, totalPages }) => ({

pagination: computed(() => ({ selectedPage: selectedPage(), totalPages: totalPages() })),

})),

Is this possible? If not used//@ ts ignore

WithComputed cannot recognize all attributes in the store

Expand full comment
Roberto Manganelly's avatar

I have read some articles (Angular official docs maybe?) saying that "making reactive calls inside effects is not recommended".

I personally try to avoid them, but in some edge cases I've been forced to circumvent this "rule".

I usually have this problem when i need to use data from store1 to trigger some reaction in store2.

and i usually use the observable mode `toObservable(mySignal)` to circumvent the error.

As you showed, there is more than one way to circumvent this, but I'd love to hear your thoughts about that design pattern.

Are there cases where having reactive calls inside effects are recommended?

would you see this rule as important for the overall app design?

Thanks for the great article.

Expand full comment