Example of using JSX without using framework like React.
There are 3 different ways:
- ./react-jsx--bare--node-modules/
using bare path to accesscustom-jsx
throughnode_modules
folder - ./react-jsx--bare--internal/
using bare path to accesscustom-jsx
internally - ./react-jsx--relative/
using relative path to accesscustom-jsx
Note: This works in browser but shows errors when usingtsc
- Node and NPM
git clone
this repo- Make sure the folder is accessible through a web server.
Lets assume this repo is available at http://localhost:8080 - In the browser, go to:
To make modifications, go to the root folder and:
- Install dependencies
npm ci
- Make modifications
- Run TypeScript Compiler after making modifications:
npx tsc
- Refresh the browser