Closed gvergnaud closed 10 months ago
Another solution:
Object.keys(nextProps)
.filter(isProperty)
.filter(wasAdded(prevProps, nextProps))
.forEach((key) => {
if (key === 'style' && typeof nextProps[key] === 'object') {
Object.assign(node.style, nextProps[key])
} else {
node[key] = nextProps[key]
}
})
Hi!
Here is the implementation for the style object prop.
Thanks again for your work on Didact :)