mitt
core
Our great sponsors
mitt | core | |
---|---|---|
15 | 283 | |
10,213 | 44,370 | |
- | 2.2% | |
4.5 | 9.8 | |
4 months ago | 7 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mitt
-
Event Bus with Vue 3 and TypeScript
Mitt is a small (200 bytes) library that provides the same functionality. It doesn't have many updates, because it's simply perfect and there are not many things to improve there. It gets the job done. Don't be frightened, if in 2 years npm will say it's 2 years old. This library is just perfect with no bloatware. In the worst case, just copy-paste its code to your app.
-
Explicit Design, Part 9. Decoupling Features with Events
The implementation can vary widely depending on the requirements. For our application, we will take a small library that will do almost everything for us:
-
Best way to pass data when dealing with deeply nested components?
You can use an event bus for this, looks like they removed this functionally from vue 3 so you'll need a 3rd party package like mitt
-
Using Event Bus in Vue.js 3
then we need to install an external library implementing the event emitter interface, in this case mitt
-
What is your must have npm package on any given project?
date-fns and mitt (event emitter) are also frequent helpers, but I'm considering dayjs and nanoevents for these cases.
-
Event emitter vs global variables
Not sure I understood the post right, bit you may want to check Mitt. It's popular event emitter package that quite nicely deals with this very issue.
-
Why and how to create an Event Bus in Vuejs 3
As suggested in official docs you could use mitt library to dispatch events across components.
-
Does vue 3 have global emit?
You can use it mitt library. https://github.com/developit/mitt
-
State Management Question
For situations like this, I use simple event emitter / pubsub library called mitt. It's small and lightweight, however there are many similar libraries that would work.
-
Event Bus Pattern in Nuxt 3 with full TypeScript support
In this article I want to show you how I have implemented this pattern in my Nuxt 3 applications using Mitt which already provides full TypeScript support. To fully understand what's happening under the hood I recommend to have a quick read of Mitt documentation before continue reading.
core
-
Using Nuxt Content: Working with Remote Markdown Files
Nuxt is an open-source framework for building performant websites and full-stack applications using Vue.js. It provides performance and SEO benefits, and adds full-stack capabilities for Vue apps.
-
The easiest way to authenticate users with Vue.js
As you can see, it's a simple Single Page Application built with Vue.js where our users can sign up / sign in with a few clicks.
-
Episode 24/13: Native Signals, Details on Angular/Wiz, Alan Agius on the Angular CLI
Similarly to Promises/A+, this effort focuses on aligning the JavaScript ecosystem. If this alignment is successful, then a standard could emerge, based on that experience. Several framework authors are collaborating here on a common model which could back their reactivity core. The current draft is based on design input from the authors/maintainers of Angular, Bubble, Ember, FAST, MobX, Preact, Qwik, RxJS, Solid, Starbeam, Svelte, Vue, Wiz, and moreβ¦
-
Securing Vue Apps with Keycloak
Vue.js is an open source web framework that makes developing web applications easier.
-
Introduction to JavaScript: Empowering Web Development with Interactivity
Frameworks and Libraries: There are numerous JavaScript frameworks and libraries, such as React, Angular, and Vue.js, which simplify the development of complex web applications.
-
Full Stack Web Development Concept map
Javascript in the browser React - react is a library that gives developers an application programming interface (API) to manipulate the DOM (this is React's ReactDOM package). React uses components and JSX to make building reusable code easier. docs JSX - is a syntax extension for React Javascript code that lets you write HTML-like markup in a javascript file. This makes it easier to write reusable HTML. docs State - a key react concept that guides setting and storage of data between renders. docs Hooks - a key react concept for logic triggered by state change docs Vue - is a framework for building web interfaces. Vue is lightweight and best for small projects prioritizing speed over functionality. doc Angular - web development framework. Angular is best for dynamic more feature rich sites. docs
-
What is Reactivity?
Vue
-
Vue 3 Explained: Rendering 101
Vue 3 Reactivity Source Code
-
Why I Personally Decided to Bet on JavaScript
Nonetheless, it offers nearly infinite possibilities. You can code and create anything, from a mobile app with React Native to a desktop application with Electron.js. Furthermore, JavaScript provides excellent frameworks and libraries that can be applied in various approaches, such as React, Three, Vue, Meteor, and Astro.
-
Use any web browser as GUI, with Zig in the back end and HTML5 in the front end
From your own example, here is the text from https://vuejs.org/ as of today:
> The Progressive JavaScript Framework
> An approachable, performant and versatile framework for building web user interfaces.
> Approachable - Builds on top of standard HTML, CSS and JavaScript with intuitive API and world-class documentation.
> Performant - Truly reactive, compiler-optimized rendering system that rarely requires manual optimization.
> Versatile - A rich, incrementally adoptable ecosystem that scales between a library and a full-featured framework.
Yes, performance is mentioned. But it's hardly the main selling point, and they don't even mention DOM manipulation, they're talking about the rendering in general.
Lit isn't even a framework, it's a "web components library".
> all modern frameworks
Yeah, "all modern frameworks" being one framework + one library?
What are some alternatives?
nodejs-pubsub - Node.js client for Google Cloud Pub/Sub: Ingest event streams from anywhere, at any scale, for simple, reliable, real-time stream analytics.
unplugin-vue-components - π² On-demand components auto importing for Vue
emitter - Event Emitter
vue-cli - π οΈ webpack-based tooling for Vue.js Development
react-recurrence - A simple, customizable, and reusable component for providing the recurrence functionality.
vite - Next generation frontend tooling. It's fast!
create-pubsub - A tiny Event Emitter and Observable Store: https://npm.im/create-pubsub
vueuse - Collection of essential Vue Composition Utilities for Vue 2 and 3
svelte-persisted-store - A Svelte store that persists to localStorage
auth - A JWT based API for managing users and issuing JWT tokens
ky - π³ Tiny & elegant JavaScript HTTP client based on the browser Fetch API
nicegui - Create web-based user interfaces with Python. The nice way.