Costro
⚡ Build web applications with Components, Store and Router in 3KB!
Install / Use
/learn @costrojs/CostroREADME
Costro
<p align="center"> <a href="https://costro.js.org" title="Costro"> <img src="https://yoriiis.github.io/cdn/static/costro/costro-1280.png" alt="Costro logo" width="250" /> </a> </p>What is Costro?
Costro is a new lightweight framework with a different approach: helping you build fast web applications with a low level of dependency. If you are concerned about your app's loading performance, this library makes sense as it is extremely lightweight compared to the competition (only 3 KB).
Costro allows you to create components with store and a router in one lightweight easy-to-use package. It does not use virtual DOM because it is, by definition, slower than carefully crafted manual updates.
Motivation
- Finding the framework that matches your needs without impacting web performance is not that easy these days. Popular librairies generally embed more and more code as the community and popularity increase.
- Single Web Applications do not benefit from page reloading to improve performance, so the JavaScript code embedded during the first load is heavier.
- In addition, we do not use 100% of the features included in the frontend frameworks and generally, the dependency part can be larger than the actual written code.
Features
- Components - Create function and class component.
- Router - Map components to the routes.
- Store - Access component store from any component.
- Lifecycle hooks - Take advantage of component lifecycle events.
- Props - Inject props into components.
- Template string or JSX - Write your templates in a native Template String or in JSX.
- JSX compiler - Transforms JSX syntax into valid DOM elements (only 1KB).
- CLI - Create a new Costro app in seconds with an interactive experience.
Documentation
You can find the Costro documentation and examples on the Costro website.
Questions
For questions and support please use the GitHub Discussions. For bug report or feature request, please use the issues on GitHub.<br />Pull Requests are welcome!
Used by
Browser support
It uses modern JavaScript to be as light as possible and therefore only works on the latest version of modern browsers (e.g. Chrome, Firefox, Edge, Safari, Opera).
Licence
Copyright (c) 2021-present, Yoriiis
Related Skills
node-connect
347.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
