This seems much nicer than my current const obj = { ...{ condition? { prop: value }: {} }}; 🤔
While it's not entirely clear at first glance how it works, I think the intent is clear enough for someone stumbling across it (excusing any bugs caused by gotchas)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This seems much nicer than my current
const obj = { ...{ condition? { prop: value }: {} }};
🤔While it's not entirely clear at first glance how it works, I think the intent is clear enough for someone stumbling across it (excusing any bugs caused by gotchas)