Suman Shrestha

Snippets | Suman Shrestha

Code Snippets & Insights

8 articles

Alpine.js Magic Properties

Understanding $el, $refs, $dispatch, $nextTick, and $watch in Alpine.js.

Building a Reusable Modal in Alpine.js

Creating an accessible, keyboard-friendly modal component using Alpine.js.

Managing State in Alpine.js

Moving beyond component-local state with Alpine.js Stores.

The Importance of is-odd Package in JavaScript

Learn why the is-odd package is essential for JavaScript developers.

Handling localStorage Availability in JavaScript

Learn how to handle localStorage availability in JavaScript and fallback to a temporary storage solution.

Environment Aware Functions for Debugging in PHP and JavaScript

Learn how to implement environment aware functions to aid in debugging in PHP and JavaScript.

A simple debounce decorator

Decorator caches the results of function calls based on the arguments passed to the function

A simple cache decorator

Decorator caches the results of function calls based on the arguments passed to the function

-

Need one on one help with Laravel and its ecosystem?

Talk to me now if you need my help. Click here