Weird inconsistent behaviour with dynamics value
See original GitHub issueCodesandbox link: https://codesandbox.io/s/p2wljkm9zm
In this example you can see
const styles = () =>
createStyles({
text: {
backgroundColor: "red", // WORKING
color: () => "blue", // WORKING
"&:hover": {
marginLeft: 20, // WORKING,
marginRight: () => 20 // WORKING,
}
},
someText: () => ({
backgroundColor: "red", // WORKING
color: () => "blue", // NOT WORKING
"&:hover": {
marginLeft: 20, // WORKING,
marginRight: () => 20 // WORKING,
}
}),
otherText: {
backgroundColor: "red", // WORKING
color: () => "blue", // WORKING
"&:hover": () => ({
marginLeft: 20, // NOT WORKING,
marginRight: () => 20 // NOT WORKING,
})
},
finalText: () => ({
backgroundColor: "red", // WORKING
color: () => "blue", // NOT WORKING
"&:hover": () => ({
marginLeft: 20, // WORKING,
marginRight: () => 20 // NOT WORKING,
})
})
});
I understand the fact function inside function does not work, like color of someText, but in this case why marginRight of someText does work ? And why marginLeft of otherText does not work ? Even weirder, it works for finalText…
If it works when it shouldn’t at least it’s not a big deal. But I think the case of marginLeft of otherText should be a correct one, and actually it doesn’t work.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (9 by maintainers)
Top Results From Across the Web
Inconsistent behaviour with dynamics when creating parts ...
I created score, with two voices. I want to create parts, each voice would be separate part. Hairpins are reproduced to both voices....
Read more >Inconsistent behavior in Automapper - Stack Overflow
Very strange thing happened in my project, i have a pretty simple CLR objects, First one is the Model other is ViewModel ,...
Read more >Inconsistent Behavior of Liquid in the Custom JavaScript ...
Upon further inspection, I noticed that I could see my Liquid syntax in the source of the webpage – which is strange because...
Read more >Dynamic inconsistency - Wikipedia
In economics, dynamic inconsistency or time inconsistency is a situation in which a decision-maker's preferences change over time in such a way that...
Read more >Inconsistent people search in Office 365 - Microsoft Community
With this odd behavior of the People search when using the All search, it's become difficult ... Office 365 value every customer's thoughts....
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 FreeTop 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
Top GitHub Comments
We are not supporting value functions inside of rule functions, it just worked by accident I think.
released in 10.1.0