Skip to content

guscost/react-tsx-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-tsx-app

React & TSX webapp with no package management or bundling

Development

To watch for TypeScript changes and serve the app:

npm install -g typescript serve
tsc --watch & serve www &

Changes will compile on save, but you will need to refresh the browser manually.

Modules

Modules in src are transpiled as amd. All but the entrypoint should have a directive naming the module:

/// <amd-module name="hooks/use-mobile"/>

By convention, shadcn/ui component names are prefixed with ui/, and application components are capitalized and not prefixed. Only one module may omit a name declaration. It's a little clunky, but this whole architecture is more like "Previous.js" anyway.

Deployment

After transpiling with tsc, copy the contents of the www folder to a static file server, and you're done.

Included dependencies

  • react
  • react-dom
  • lucide-react
  • tailwindcss
  • @radix-ui/*
  • Basic shadcn dependencies: clsx, class-variance-authority, tailwind-merge, etc

Updating dependencies

To update included dependencies, set versions and run npm run update in the update folder.

Wish list

Here are some things I'd like to add:

Dynamic module loading

  • Removes need to embed every script in its own <script> tag

Fully-typed shadcn dependencies

  • react-day-picker
  • react-resizable-panels
  • Missing components: Carousel, Chart, Data Table, Form, Input OTP, Sonner

About

React TSX app with no bundling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published