data-id inside JSXExpressionContainer's value ....
See original GitHub issueCan 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);
expect(uglify(actual)).to.equal(uglify(expected));
});
I hacked something together here …
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top 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 props.foo 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
sure, give me a bit … in crunch time for black Friday
Closed by #23