1.7 KiB
Instead of using outdated Bootstrap v4 alpha 2 theme, I rewrite it on UnoCSS, an awesome efficient Tailwind-like utility-first CSS framework, with Dark Mode support.
For API communication, as we have full proper OpenAPI spec, it's a real benefit to have a generated Typescript client for full autocompletion feature. The well known OpenAPI Generator is okay for this task but generate massive amount of code as it generates a complete client SDK.
Thankfully this openapi-typescript package is a for more lightweight solution. It simply translates the OpenAPI spec to a simple Typescript file, with only types. No code generation involved ! In order to work, we need to use a specific fetch tool which will use all advanced features of Typescript 4 in order to guess type all the API with only a single TS file in runtime !
Common packages involved :
- Vite as main bundler
- ESLint with Prettier for linting and code formatting
- Iconify as universal icons
- TanStack Query, compatible with
Vue
andReact
for nice API communication and powerful caching system
To sum up, at the time of Vue 2
(Options API) and React <16.8
(class components), it was a complete different DX and each framework have their own unique way to develop components. But now with Composition API
and React Hooks
, the gap is much smaller and became just a matter of taste, JSX
vs Vue template
, tooling, community, etc.