Here is my simple example:
class Speaker {
constructor(name) {
this.name = name
}
say(msg) {
console.log(`${this.name}: ${msg}`)
}
Here is my simple example:
class Speaker {
constructor(name) {
this.name = name
}
say(msg) {
console.log(`${this.name}: ${msg}`)
}
JSX can get messy fast.
I was recently introduced to writing smart and dumb components when using react. As an extension to keeping the presentation code strictly within dumb components, I try to write one line JSX.
Original JSX (NOT ONE LINE JSX):
class SomeListComponent {
render() {
let names = this.props.names.map(({first, last}) => {