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.

What about support for data-* attributes?

See original GitHub issue

I noticed I can add data-* attributes to the virtual dom and they work as expected both with React and Inferno. I’m curious about why this doesn’t work with Preact. Is that on purpose. What would be the reason for that? I just get an empty dataset with Preact.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:34 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
leeoniyacommented, Jun 10, 2017

for some deal types, will render over a thousand separate fields with components attached to them such as autocomplete, sliders and datepickers

the fast vdom libs have very low overhead [1]. most of the slowdown will be from the fact that you have a huge DOM for the browser to render rather than a huge backing vtree. “over one thousand” is peanuts 😃

[1] https://rawgit.com/krausest/js-framework-benchmark/master/webdriver-ts/table.html

1reaction
developitcommented, Jun 10, 2017

A lot of the complexity and size in datepickers comes from those edge cases as @leeoniya pointed out. If you can skip them, skip them. The Canadian VS US dates you can probably do as a display mechanism if you’re using VDOM (data doesn’t have to be displayed in the same format as it is held/edited). I agree the numbers you’re looking at actually aren’t that bad, and Code Splitting seems like an easy bit of low-hanging fruit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dataset & data-* attributes | Can I use... Support tables for ...
Partial support refers to being able to use data-* attributes and access them using getAttribute . "Supported" refers to accessing the values using...
Read more >
Using data attributes - Learn web development | MDN
HTML is designed with extensibility in mind for data that should be associated with a particular element but need not have any defined ......
Read more >
A Complete Guide to Data Attributes | CSS-Tricks
Everything you ever wanted to know about data attributes in HTML, CSS, ... This browser support data is from Caniuse, which has more...
Read more >
Customer Data Attributes - Re:amaze
Customer data attributes are data points about your customer. The customer data attributes will be displayed under the first message of every conversation ......
Read more >
Reference data attributes - Informatica Documentation
You can create custom attributes that support reference data from other assets. These reference data attributes allow you to use code values in...
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