This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
Releases: CIUK/snabbdom-react-components
Releases · CIUK/snabbdom-react-components
[email protected]
[email protected]
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]
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]
A stable version of snabbdom react components
[email protected]
First pre-production ready release