I mess this up all the time. This error
“Expected an assignment or function call and instead saw an expression”
Is usually caused when I am making a fat arrow function that is intended to return an object literal. That type of function needs the part after the arrow to be wrapped in () for some reason. There is more info available on object literal syntax in fat arrow functions here.