How to use Elm in tsx file?

I don’t know anything about React or Typescript, but I presume you first need to compile A.elm into A.js with something like elm make A.elm --output A.js --optimize. Then pass A.js into create-react-app.