Liroy Leshed Liroy Leshed - 1 year ago 153
React JSX Question

JavaScript/React Style Guide Indentation

Is there an agreed-upon convention for indentation in React JSX?
2 spaces, 4 tabs, etc.

Answer Source

You should just use the same indentation as the rest of your javascript code.

That said react ecosystem seems to use mostly double spaces so I'd use that for consistency.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download