Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Releases: CIUK/snabbdom-react-components

[email protected]

24 Feb 12:27
Compare
Choose a tag to compare

This release fixed problem with unexpected object mutation when data was accessed through Styled Component.

Furthermore, all console logs have been deleted, as it should be from the very beginning.

Enjoy!

[email protected]

22 Feb 19:44
Compare
Choose a tag to compare

Update for Styled Components. Now you have access to data attribute of your vnode straight inside the styled!

See example:

const Page = styled.section`
  ${(props, data) => {
    data.key = props.pageId
  }}

  display: flex;
  justify-content: center;
  width: ${props => props.scale * 1060}px;
  height: ${props => props.scale * 1500}px;
`

// usage:

Page({
  styled: {
    scale: 0.85,
    pageId: 1
  }
})

Enjoy!

[email protected]

03 Feb 12:00
Compare
Choose a tag to compare

This release improves the way how custom function consumes params.

For now on, you don't have to pass either state or component to your custom functions. Take a look on example:

import { createComponent, patch, h } from '../src';

const app = createComponent({
  test(custom, state, component) {
    console.log(custom, state, component);
  },
  render(state, component) {
    // All the methods you define, will be placed under the items.
    // Why? It's just a convention we took 🤔
    component.items.test('hello');
    return h('div', 'hello');
  },
});

patch(document.getElementById('root'), app);

The state and component will always be available on the end of your params list 😁

[email protected]

02 Feb 10:05
Compare
Choose a tag to compare

A stable version of snabbdom react components ♥️

[email protected]

02 Feb 09:21
Compare
Choose a tag to compare
[email protected] Pre-release
Pre-release

First pre-production ready release