I recently picked up a new project that uses React. Out of the box, my configuration doesn’t seem to be doing very well – indentation is erratic (sometimes thrown off by JSX), no lsp-rename
, and generally things are slow.
Are there any generally recommended approaches for React development with Emacs? Language server, minor modes, tree-sitter, etc? There seem to be a lot of options and modes available.
The codebase is currently JavaScript and JSX, but I’m considering Typescript and TSX down the line. Should I just default to the TypeScript tooling?
You must log in or register to comment.
I use:
- apheleia for code formatting via prettier
- envrc for managing node versions
- add-node-modules-to-path
- js-ts-mode, typescript-ts-mode, tsx-ts-mode via treesit-auto
- eglot with tsserver
Along with something for eslint in flymake
add-node-modules-to-path is broken since npm dropped support for the
npm bin
command.