stimulus-use
browserslist
Our great sponsors
stimulus-use | browserslist | |
---|---|---|
9 | 55 | |
1,389 | 12,703 | |
2.8% | 0.9% | |
8.7 | 7.8 | |
4 days ago | about 2 months ago | |
JavaScript | JavaScript | |
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.
stimulus-use
-
A powerful search feature with what Rails provides out of the box
You can see that I added a dependency here: stimulus-use.
-
Discover Symfony UX’s Twig Components. UI without JS or BS.
“stimulus-use: Add composable behaviors to your Stimulus controllers, like debouncing, detecting outside clicks and many other things.
-
RVTWS: a Ruby stack for modern web apps
Actually, Stimulus is pretty cool because you can compose multiple pre-built behaviors into one Stimulus controller, for a sort of functional approach to component behaviors. The tradeoff is that a growing web of Stimulus controllers (plus HTML data attributes associated with them) can become complex and hard to understand.
-
Tailwind style CSS transitions with StimulusJS
The stimulus-use project is a collection of reusable behaviors for Stimulus. If you are familiar with React, this project is similar to React’s hooks system, but for Stimulus controllers.
-
Pagination and infinite scrolling with Rails and the Hotwire stack
To make using the IntersectionObserver API easier, we will add the wonderful stimulus-use package to our application. This is not a requirement, but it does simplify the code a bit.
- Autocomplete search with Hotwire (zero lines of Stimulus or other JS)
-
Upgrade to Stimulus 3, say bye to IE11, and celebrate 🎉
Finally, as we recently added the Stimulus-Use library to our project, we made sure to upgrade it to current beta which supports Stimulus 3.
-
Hotwire: best practices for stimulus
As you’ll see below, I am importing useClickOutside from stimulus-use, it’s a great library with small, composable helpers, I urge you to check it out!
-
Migrating Selenium system tests to Cuprite
For example, we have a few ”live search“ fields, backed by back-end Fetch requests, on some pages. The live search function was usually triggered by the keyup event and Cuprite was such a fast typewriter that it frequently sent multiple requests almost at once. If some of the responses got a bit late or out of sync, the front-end JavaScript code began hitting issues. We solved this by adopting a technique called debouncing and, frankly, we should have done this since the beginning. By the way, we used the useDebounce module from the marvelous Stimulus-use library to achieve this.
browserslist
- Browserslist/browserslist: `not and_UC all`
-
Shoelace: A forward-thinking library of web components
Not these days, where most people are using evergreen browsers and iOS users upgrade very quickly.
Take a look at the defaults for browserslist, for example:
https://browsersl.ist/#q=defaults
It just barely supports Safari 15, on iOS only, and that’s likely to go away imminently because it’s under 1% usage.
-
How to Clone an Object in JavaScript
browserslist
-
How we improved page load speed for Next.js ecommerce website by 1.5 times
We compile JS only for modern browsers. The list of default browsers in Next can be overridden in your browserslist.
-
The Need for Speed: Next.js Performance Overhaul with Polyfills and SWC
In the latest versions of Next.js, targeting specific browsers or features is a breeze using the Browserslist configuration in your package.json file. The latest version of Next.js (v13) uses the following configuration by default:
-
How can I find out if I should support IE 9/10/11?
For a more general answer to browser support, check out https://github.com/browserslist/browserslist. That seems to be standard tool to help you with that.
-
WebGPU hits 40% availability 2 weeks after Chrome releases support
As someone else pointed out, you're overestimating Chrome/ium's market share.
Regardless, after the web.dev/baseline announcement, I looked at Browslerlist and one of our site's analytics and it is shocking how many people are not using the last two versions of evergreen browsers. There is a long tail of browser versions in those stats.
https://browsersl.ist
-
Baseline: a unified view of stable web features
The way folks handle this in production is with browserslist, which lets you query on different things you want to support: https://github.com/browserslist/browserslist. This in turn tells other parts of your tooling what language features to transpile for production.
I imagine tools could be built on top of that which do what you’re asking too
- Browserslist
-
Configure Stimulus with esbuild and Babel — Rails & Javascript
# .browserslist.rc # Babel Preset configuration # -------------------------- # Defines web-browser compatibility parameters for Babel to transpile your JS code. # This configuration is used by babel.config.js. # More information in here. # https://github.com/browserslist/browserslist # Support browsers with a market share higher than 5% >10%
What are some alternatives?
Capybara - Acceptance test framework for web applications
autoprefixer - Parse CSS and add vendor prefixes to rules by Can I Use
dropzone - Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.
parcel - The zero configuration build tool for the web. 📦🚀
hotwire-example-template - A collection of branches that transmit HTML over the wire.
caniuse - Raw browser/feature support data from caniuse.com
cuprite - Headless Chrome/Chromium driver for Capybara
rollup-plugin-postcss - Seamless integration between Rollup and PostCSS.
cssui - A collection of interactive UI components in pure CSS
ECMAScript 6 compatibility table - ECMAScript compatibility tables
ferrum - Headless Chrome Ruby API
rollup-plugin-terser - Rollup plugin to minify generated bundle