question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for style diffing (setting style to an object value) was removed, and there is currently no way for a library to add it back in.

As discussed here this could be solved by reconsidering support for modularity, which was previously proposed in #86. (this PR is outdated, and the approach is probably wrong, see below.)

Note that the approach in that PR was based on use a global registry, which should be avoided, as discussed in the comments above.

Needs a detailed proposal, but one idea is to make this feature available via currying to avoid global state. You would get a default instance of the render function with only the built-in attribute-handlers - as well as a factory-function, which you could use to generate another instance of render with additional attribute-handlers registered in the instance of it, to avoid global state and side-effects.

For example:

import * as ultradom from "ultradom";

export const render = ultradom.render.with({
  style: (el, value, oldNode, newNode) => {
    // diff and apply style properties
  }
});

That’s just an idea - this needs a more detailed proposal.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
mindplay-dkcommented, Jul 3, 2019

Style support is back.

And now it’s gone again. 😏

1reaction
jorgebucarancommented, Jul 4, 2018

Style support is back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spread attributes - React Hooks Handbook - Design+Code
The spread operator can be useful when we want to pass a lot of props from one component to the other. However, be...
Read more >
Hooks - SpecFlow's documentation
Hooks (event bindings) can be used to perform additional automation logic at ... In order to use hooks, you need to add the...
Read more >
Woocommerce Product Attribute Hooks - Arrow Design
Woocommerce Product Attribute Hooks. In this post you will learn how to get the product sku, description, short description, regular price, ...
Read more >
Is there a hook for when a new term is added to a product ...
I'm trying to add an action that executes whenever a new term is added to a certain product attribute. So for each product...
Read more >
@react-vertex/attribute-hooks - npm
React hooks for WebGL attributes. Latest version: 1.2.0, last published: 4 years ago. Start using @react-vertex/attribute-hooks in your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found