Skip to content

Releases: effector/reflect

v8.2.0

02 Mar 08:39
ee90926
Compare
Choose a tag to compare

🚀 Features

📚 Documentation

🧪 Tests

v8.1.0

01 Mar 04:48
5b2bbbf
Compare
Choose a tag to compare

🚀 Features

v8.0.0

13 Jul 06:57
a5e8cf5
Compare
Choose a tag to compare

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

v7.1.1

27 Dec 14:23
caff4ab
Compare
Choose a tag to compare

🐛 Bug Fixes

  • feat: typings update #33 (@AlexandrHoroshih)
  • bind and mapItem now optional for for list 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

17 Dec 11:17
36b9a20
Compare
Choose a tag to compare

🚀 Features

v7.0.1

25 Sep 19:17
Compare
Choose a tag to compare

🐛 Bug Fixes

v7.0.0 ❗️

21 Sep 11:24
c6f9226
Compare
Choose a tag to compare

Stable release

🚀 Features

🧰 Maintenance

🧪 Tests

v0.6.0

24 Mar 14:07
Compare
Choose a tag to compare

🚀 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

16 Feb 10:21
Compare
Choose a tag to compare

🚀 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

28 Jan 11:55
Compare
Choose a tag to compare
v0.4.1 Pre-release
Pre-release

🧰 Maintenance

  • build(deps): bump node-notifier from 8.0.0 to 8.0.1 #1 (@dependabot)
  • added typings to a package.json