| "use client"; | |
| import { cache, unstable_postpone } from "react"; | |
| import { preload } from "react-dom"; | |
| const loadImage = cache((src: string) => { | |
| return new Promise<void>((resolve, reject) => { | |
| const img = new Image(); | |
| img.src = src; |
| import axios from 'axios' | |
| import { useOptimisticMutation } from "./useOptimisticMutation.ts" | |
| type Response = boolean | |
| type Error = unknown | |
| type MutationVariables = {itemId: string} | |
| type Items = {id: string; name: string}[] | |
| type Likes = {itemId: string}[] | |
| type History = {type: string}[] |
| // I'm tired of extensions that automatically: | |
| // - show welcome pages / walkthroughs | |
| // - show release notes | |
| // - send telemetry | |
| // - recommend things | |
| // | |
| // This disables all of that stuff. | |
| // If you have more config, leave a comment so I can add it!! | |
| { |
So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.
-
Database in a browser, a spec (Stepan Parunashvili)
What problem are we trying to solve with a sync system?
-
The web of tomorrow (Nikita Prokopov)
Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.
Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.
The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || trueThe package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'instead ofconst foo = require('foo')to import the package. You also need to put"type": "module"in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)from CommonJS instead ofrequire(…). - Stay on the existing version of the package until you can move to ESM.
Basically, with a pipeline we can pass an object through a stack of tasks and get the result via a callback.
Refer Here -> https://laravel.com/api/7.x/Illuminate/Pipeline/Pipeline.html
The method handle used to execute the task receives two parameters, the first is the object that we passed to our pipeline, the second is a closure, where the object will be sent to run the next task.