Engineering

Our engineering is underpinned by principles that celebrate both the integrity of code and the ambition to innovate. This manifesto champions excellence, advocates for the adoption of cutting-edge technologies, and fosters an environment of continuous intellectual growth.

JS File extensions

Use .js for JavaScript file extensions. Avoid using .jsx.

Rationale

Here are a few reasons to avoid the .jsx file extension: • Not recommended by the React team — The React themselves doesn't recommend the .jsx extension. The official create-react-app only later started supporting it in 2016 (v0.4.1). • Lack of support — Webpack, Node.js, and browsers do not support the .jsx file extension by default. It's possible to configure Webpack to support .jsx files, but this is more of an "aftermarket" tweak than a typical use case. • Developer friction — If you were to add a line of JSX into a .js file, you'd need to rename it to .jsx. This hurts the ergonomics of the developer experience, as noted by Dan Abramov in this comment.

References

See these online discussions on the issue: • https://github.com/airbnb/javascript/pull/985#issuecomment-239145468 • https://github.com/facebook/create-react-app/issues/87#issuecomment-234627904

Next: Design Playbook

Connect.

Mashup Garage, a premier software development team, specialises in crafting exceptional products for startups and enterprises. With expertise in React, Elixir/Phoenix, and Ruby on Rails, we deliver solutions that meet your unique needs. Our mission is to bring value backed by decades of technical expertise and global co-founding experience.

What do you need help with?

Build a project

Build a team

Consult

Speak to someone

Expect a guaranteed response from us in 1-2 business days.

United Kingdom

London

Islington, London

+44 738 777 3405

LDN

Philippines

Manila

3F Topy IV Building, 3 Economia Road, Bagumbayan, Quezon City, 1110

+63 917 3084089

MNL