React
Alpine.js
Our great sponsors
React | Alpine.js | |
---|---|---|
918 | 137 | |
188,060 | 20,684 | |
1.5% | 2.2% | |
9.8 | 9.4 | |
4 days ago | 11 days ago | |
JavaScript | HTML | |
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.
React
- Is there a reason you shouldn't use this custom state hook?
- I was going through my Apple analytics data on my iPhone and saw this field name that’s actually in production!
-
Merging Pull Requests Like a Pro With Mergify
For the purpose of this hands on, let's build a basic React project to showcase the features. Once you have cloned the repository, change the working directory to the Mergify directory and then run the following command to create a new React application.
-
LunchboxJS – Vue 3/Three.js custom renderer
We used React Three Fiber at my job 2-3 years ago (when it was "early") and it was already amazing then, we could do really cool stuff easily. We wrote our own wrappers to easily do and similar things and published it as OSS[1], but TBH documentation was scarce since it was an internal project and there were virtually no resources dedicated to publish it, just a couple of devs pushing for it. We even published one of the first bridges[2]. We didn't want to totally opt out of the React render loop so we had to do a lot of hacks and optimizations, but it was a great experience overall.
Nowadays React Three Fiber is very mature and you have the "drei" collection[3], which have all the things I mentioned and a lot more. Though now looking at the source and timing (we published a blog [4] with our solution and their commit few weeks later with almost the same code[5]) it seems they might've copied our solution as part of their package, would've loved a heads up or ack but well happy to make open source better.
[1] https://www.npmjs.com/package/@standard/view
[2] https://github.com/facebook/react/issues/13332#issuecomment-...
[3] https://github.com/pmndrs/drei
[4] https://standard.ai/blog/introducing-standard-view-and-react...
-
Using Zustand in React applications
context loss - https://github.com/facebook/react/issues/13332 AND the most beauty of it is that the store it provides is a hook and you can put objects or functions in it. How awesome is that!
-
Optimizing Your Web App for Maximum Runtime Performance and Premature Optimization 🦄
If your component depends on useContext(), React.memo() is useless. The component would rerender irrespective if the memo.
-
Use Vite for React Apps instead of CRA
Most of us will be using Create React App for creating React App. It supports all the configurations out of the box. But when your project code grows you might face higher build times, a slower start in the development server and waiting 2 to 5 secs to reflect the changes you have made in code and this might increase rapidly when the app grows on a larger scale.
-
Single Responsibility with React Components
Three weeks ago I began learning the JavaScript React framework.
-
How to add Dark mode in Next.js Application using Tailwind CSS.
Next.js is a React based open-source frontend framework, with features like SSR (Server Side Rendering) and SSG (Static Site Generation). Next.js also comes SEO optimized right out the box so you don't have to do it yourself from the scratch.
-
Keeping up to date with reactjs
It can be a bit verbose/granular, but the project’s CHANGELOG is a feed of new features and bug fixes.
Alpine.js
-
I made a Tailwind color gradient generator
I wanted to make a custom gradient for a client, but found it very annoying to do manually, so I found the Color.js library and used that together with Alpine.js to make this little tool:
-
Are Web Components production ready in 2022? Or should I stick with React, Vue, or some other alternatives? As well as other tips for creating scalable and maintainable design library
My go-to these days is AlpineJS since it's familiar enough due to being designed after Vue, no shadow DOM and no scoped styles to deal with, and lightweight. I'd probably just bundle them into components using bind. You can use modules and import an AlpineJS CDN in your AlpineJS components, which you can serve from a CDN if you wanted.
-
My thoughts on Mithril.js
Having (real) components, sets it apart from other no-build / small runtime frameworks (like Alpine.js and Vue-Petite), because this allows for the creation of advanced full-size SPAs.
-
Which technology has overtaken jQuery?
However, since bootstrap is the css of jQuery, Tailwind is the css of Alpine js, And since tailwind is an alternative for bootstrap, then alpine is said to be the alternative to jQuery.
-
JSONPath with Alpine.js CSP build in Postman Visualizer
Then I thought this is a good opportunity of being a smart ass and implement it with Alpine.js, and it was just a mess—but I found out a few things.
-
Tasty Vanilla JS - 4 tips
Mini-frameworks like AlpineJS, Vue-Petite, and Stimulus exist exactly to fill this space. But whenever I consider reaching for one of these, I usually find that the job can just as easily be done in Vanilla JS. And if it can't, it typically requires the big-framework-X anyway.
- How to update values visually
-
Building a fullstack app with Flask and HTMx
I was going by Github language stats indicating 90% HTML / 10% JS https://github.com/alpinejs/alpine
-
Update a single div on a page?
The other poster's answer covers htmx. Another approach is to use alpine.js, which is a minimal JS library. Regardless, if you want to fetch data without a full page refresh, you have to use AJAX.
-
Our tech stack in 2022
One of our clients asked for Alpine.js in combination with Laravel Livewire. It turns out those work well together. Let us see if we want to use it more often in the future.
What are some alternatives?
Svelte - Cybernetically enhanced web apps
petite-vue - 6kb subset of Vue optimized for progressive enhancement
htmx - </> htmx - high power tools for HTML
Stimulus - A modest JavaScript framework for the HTML you already have [Moved to: https://github.com/hotwired/stimulus]
jQuery - jQuery JavaScript Library
SvelteKit - The fastest way to build Svelte apps
lit-element - LEGACY REPO. This repository is for maintenance of the legacy LitElement library. The LitElement base class is now part of the Lit library, which is developed in the lit monorepo.
Vue.js - 🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
Mithril.js - A JavaScript Framework for Building Brilliant Applications
hotwire-rails - Use Hotwire in your Ruby on Rails app