JSFiddle - React, Tailwind, and code Playground
JavaScript
// pseudo code
obj1 = {
xy: {
x: 'foo',
y: this.x + 'bar'
}
}
// working
obj2 = {
xy: (function() {
x = 'foo',
y = console.log(this.x + 'bar')
})()
}
// need to access stuff like this
obj1 = {
xy: {
x: 'foo',
y: this.x + 'bar'
}
z: xy.y
}