allow useStoreMap for shapes
Open
RFC
- Dominant language
- TypeScript
- Stars
- 4.9k
- Forks
- 280
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 7
Description
## Proposal
```typescript
const value = useStoreMap({
shape: { a: $a, b: $b, c: $c }, // ! now param name is "store", proposal - rename to "shape" or "units"
keys,
fn
});
```
+ maybe rename this method to `useShapeMap` or `useUnitMap` оr `useUnitMemo` ?
## Use case
now, we need a combined store for this cases:
// model.ts
```typescript
import { combine } from "effector";
export const $combined = combine({ a: $a, b: $b, c: $c })
```
// Component.tsx
```typescript
import {$combined} from "./model.ts";
...
const value = useStoreMap({
store: $combined,
keys,
fn
});
```
Contributor guide
Assessment
This issue has not been assessed yet.