Example (React component):
Save as Python3.sublime-build – then Ctrl+B to run. Tools → Developer → New Snippet sublime 4
<snippet> <content><![CDATA[ import React from 'react'; const $1:ComponentName = () => return <div>$2</div>; ; Example (React component): Save as Python3