How to place properly property right/left into react's component style object?

```
const [pos, setPos] = useState(null);
useEffect(()=>{
  if(someCondition){setPos('left')}
  else{setPos('right')}
})
return (
  <div style={{`${pos}:0`}} />
)

```

My solution above does not work. I receive string and in style i need object prop. Can you please help?