Skip to content

Commit aa9e123

Browse files
authored
V2.0.0
- renamed `fn` to `mapProps` - `when` parameter to defer slot insertion until specified Effector events fire
1 parent 611e9ee commit aa9e123

File tree

13 files changed

+510
-330
lines changed

13 files changed

+510
-330
lines changed

.size-limit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{ "path": "dist/index.js", "limit": "800 B" }]
1+
[{ "path": "dist/index.js", "limit": "850 B" }]

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
44
and this project adheres to [Semantic Versioning](http://semver.org).
55

6+
## 2.0.0
7+
8+
### Changed
9+
10+
- renamed `fn` to `mapProps`
11+
12+
### Added
13+
14+
- `when` parameter to defer slot insertion until specified Effector events fire
15+
16+
```tsx
17+
const userLoaded = createEvent<{ id: number }>();
18+
19+
slotsApi.insert.into.Header({
20+
when: userLoaded, // Wait for event
21+
mapProps: (slotProps, whenPayload) => ({ userId: whenPayload.id }),
22+
component: (props) => <UserWidget id={props.userId} />,
23+
});
24+
25+
userLoaded({ id: 123 }); // Component inserted now
26+
```
27+
628
## 1.1.0
729

830
### Added

0 commit comments

Comments
 (0)