effector/patronum

Readonly create store if args is not unitable

Opened this issue · 1 comments

Sometimes needed readonly store from incoming arguments outside, in factories functions for examle.
How can a solution be processed inside a function an argument that is not a unit by creating a unit from it

there is now:

const someFunction(arg1:number, arg2:string) {
    const $store = readonly(createStore(arg1)); 
}

and how can it be:

const someFunction(arg1:number, arg2:string) {
    const $store = readonly(arg1); 
}

for example just add to the top one more check is.unit, if args is false return new combine