I\'m doing some React right now and I was wondering if there is a \"correct\" way to do conditional styling. In the tutorial they use
style={{ textDecorati
If you need to conditionally apply inline styles (apply all or nothing) then this notation also works:
style={ someCondition ? { textAlign:'center', paddingTop: '50%'} : {}}
In case 'someCondition' not fulfilled then you pass empty object.