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.

data-id inside JSXExpressionContainer's value ....

See original GitHub issue

Can the capability be added to remove data-id’s from other attributes that are passed to other components as other props?

Something like this … ?

      it('removes data-test-id inside of other attributes that are passed in as objects', () => {
        const code = '<p someOtherAttribute={{ "data-test-id": "should-be-removed" }} someOtherAttributeKeep={{ className: "should-keep" }}></p>';
        const expectedCode = '<p someOtherAttributeKeep={{ className: "should-keep" }}></p>';
        const actual = x(code, { usePlugin: true });
        const expected = x(expectedCode);

I hacked something together here

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

mstruenseecommented, Oct 16, 2019

sure, give me a bit … in crunch time for black Friday

coderascommented, Nov 14, 2019

Closed by #23

Read more comments on GitHub >

github_iconTop Results From Across the Web

if-else statement inside jsx: ReactJS
As per DOC: if-else statements don't work inside JSX. This is because JSX is just syntactic sugar for function calls and object construction....
Read more >
JSX In Depth
JavaScript Expressions as Props ... For MyComponent , the value of will be 10 because the expression 1 + 2 + 3...
Read more >
How To Create React Elements with JSX
In this code, you created a variable above the return statement called greeting with the value of "greeting" , then referenced the variable...
Read more >
Template Syntax | Vue.js
Vue uses an HTML-based template syntax that allows you to declaratively bind the rendered DOM to the underlying component instance's data.
Read more >
8 common React error messages and how to address them
Sometimes, you won't have a unique identifier attached to your data. An easy fix is to use the index of the current item...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found