Releases: effector/reflect
Releases · effector/reflect
v8.2.0
🚀 Features
- Add new overload for
variant
forsource: Store<boolean>
#56 (@igorkamyshev)
📚 Documentation
- Add article about why reflect is cool #59 (@AlexandrHoroshih)
🧪 Tests
- No pre-push hook #57 (@igorkamyshev)
v8.1.0
- Improve docs about latest releases #53 (@igorkamyshev)
🚀 Features
- Allow to pass Event as event handlers #55 (@igorkamyshev)
- Rewrite reflect module and types #47 (@iposokhin)
v8.0.0
Changelog
🚀 Features
- React 18 is now supported 🎉
🧰 Maintenance
@effector/reflect/ssr
export is deprecated, prefer@effector/reflect/scope
instead - it is a better name, since there are more effector's Fork API usecases, than just SSR
❗ Breaking changes
[email protected]
is now minimal requirement forreflect
usage, since it allows to introduce[email protected]
support and to use auto-batching feature of brand newuseUnit
hook 🎉[email protected]
is now minimal required version ofeffector
forreflect
to work
v7.1.1
🐛 Bug Fixes
- feat: typings update #33 (@AlexandrHoroshih)
bind
andmapItem
now optional for forlist
in both types and implementation (closes
Why list.bind and list.mapItem are required? #29)variant
will not require to specify all possible cases (for e.g. we need only a couple and render default for the rest). But it is still forced to add at least one possible case at types level, otherwise there is no sense to use variant at all
v7.1.0
🚀 Features
- Update build configuration and add ESM-build #31 (@AlexandrHoroshih)
v7.0.1
🐛 Bug Fixes
- Allow to use reflect with effector 22 #28 (@AlexandrHoroshih)
v7.0.0 ❗️
Stable release
🚀 Features
- Update effector dependecies #23 (@AlexandrHoroshih)
- Add property
getKey
touseList
#8 (@AlexandrHoroshih)
🧰 Maintenance
- build(deps): bump browserslist from 4.14.7 to 4.17.0 #26 (@dependabot)
- build(deps): bump ws from 7.4.0 to 7.5.5 #25 (@dependabot)
- build(deps): bump tmpl from 1.0.4 to 1.0.5 #24 (@dependabot)
- build(deps): bump path-parse from 1.0.6 to 1.0.7 #22 (@dependabot)
- build(deps): bump glob-parent from 5.1.1 to 5.1.2 #19 (@dependabot)
- build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 #14 (@dependabot)
- build(deps): bump lodash from 4.17.20 to 4.17.21 #15 (@dependabot)
- build(deps): bump y18n from 4.0.0 to 4.0.1 #9 (@dependabot)
🧪 Tests
- Add tests for
getKey
option inlist
#16 (@AlexandrHoroshih)
v0.6.0
🚀 Features
Introduced method list
#6 (@AlexandrHoroshih)
list({
view: React.FC,
source: Store<Item[]>,
bind: {
// regular reflect's bind, for list item view
},
mapItem: {
id: (item: Item) => item.id, // maps array store item to View props
name: (item: Item) => item.name
},
getKey: (user: Item) => `${user.id}${user.name}` // getKey for `useList`
});
const $users = createStore([
{id: 1, name: 'Yung'},
{id: 2, name: 'Lean'},
{id: 3, name: 'Kyoto'},
{id: 4, name: 'Sesh'},
]);
const Item = ({ id, name, color }) => {
return (
<li style={{ color }}>
{id} - {name}
</li>
);
};
const Items = list({
view: Item,
source: $users,
bind: {
color: $color
},
mapItem: {
id: (user) => user.id,
name: (user) => user.name
},
getKey: (user) => `${user.id}${user.name}`
});
<List>
<Items />
</List>
v0.5.0
🚀 Features
Introduced variant
That allows selecting components based on the store value.
const Field = variant({
source: $fieldType,
bind: { onChange: valueChanged, value: $value },
cases: {
date: DateSelector,
number: Range,
},
default: TextInput,
});
Introduced hooks
const Component = reflect({
view: Base,
bind: props,
hooks: { mounted, unmounted },
})
v0.4.1
🧰 Maintenance
- build(deps): bump node-notifier from 8.0.0 to 8.0.1 #1 (@dependabot)
- added typings to a package.json