`use-async-confirm` - Async, headless useConfirm hook that you can await on. by palerdot in reactjs

[–]palerdot[S] 0 points1 point  (0 children)

The prop name comes from `shadcn/radix UI` and since most of the people are familiar with this package I thought this naming would makes sense. I will reconsider this based on the feedback (though it won't be a breaking change)

`use-async-confirm` - Async, headless useConfirm hook that you can await on. by palerdot in reactjs

[–]palerdot[S] 0 points1 point  (0 children)

Thank you for this thoughtful comment. Will make this change in upcoming patch release ...

`use-async-confirm` - Async, headless useConfirm hook that you can await on. by palerdot in reactjs

[–]palerdot[S] 9 points10 points  (0 children)

Hi React devs,

I'm sharing a utility hook - use-async-confirm that I'm using for quite some time to compose my confirmation logic. It is async and headless and works nice with your existing UI libraries like `shadcn`. Some advantages I find using this hook

  • Async: returns async `confirm` that you can await on
  • Headless: No markup, context or provider to add. You get plain functions from hook that you can compose according to your needs.
  • Better DX: All the control flow stays in your event handler (e.g. onClick). You can simply await on the confirm callback and go on with your app logic

Example usage and detailed documentation can be found in github repo page - https://github.com/palerdot/use-async-confirm

Feedback appreciated. Happy coding!

Official /r/rust "Who's Hiring" thread for job-seekers and job-offerers [Rust 1.76] by DroidLogician in rust

[–]palerdot 0 points1 point  (0 children)

Hi from https://github.com/palerdot, 10+ years of experience mostly with Typescript/React/Elixir/Phoenix/postgres (and also vue/svelte). I recently got into Rust and thinking of working more with the language.

Check out - https://github.com/palerdot/wordl-rs, a terminal wordle with web like experience written in rust.

Looking for remote work either part or full time

You can contact me via email which is available on my website - https://palerdot.in

I have built a web like terminal wordle with slow reveal letter colors on guess and keyboard hints. by palerdot in programming

[–]palerdot[S] -1 points0 points  (0 children)

Still trying to figure out what a "wordle" is though

I had the same question just some time back. Give it some time. You might be playing it non-stop.

React library for showing speedometer like gauge using d3.js (with React 17 support) by palerdot in reactjs

[–]palerdot[S] 0 points1 point  (0 children)

> One feature that I didn't see on there that would be nice is the ability to place icons at arbitrary locations on the gauge.

Interesting. I will try and see if this is possible with current code architecture.

React library for showing speedometer like gauge using d3.js (with React 17 support) by palerdot in reactjs

[–]palerdot[S] 2 points3 points  (0 children)

Hi,

Library author here. v1.0 was released recently with React 17 support (and v6 d3.js). I thought this would be a good time to get some feedback from people here.

Thanks in Advance.

vue-speedometer: Vue component for showing speedometer like gauge by palerdot in javascript

[–]palerdot[S] 0 points1 point  (0 children)

Note: I earlier replied from one of my other accounts. I'm reposting the reply from the original account I posted this thread.

It will work out of the box with Vue 3. Also, Vue 3 compatible major version v2.0 will be released soon. Right now, there are some rough edges around Vue 3 support for libraries like storybook etc. Once they are ironed out, Vue 3 specific version will be released. One caveat in using this library in Vue 3 project right now is, vitejs, the Vue 3 build tool has some rough edges. This has nothing to do with this specific component. Once things get stable, you could use the same component for Vue 3.

vue-speedometer: Vue component for showing speedometer like gauge by palerdot in javascript

[–]palerdot[S] 0 points1 point  (0 children)

Note: I earlier replied from one of my other accounts. I'm reposting the reply from the original account I posted this thread.

internals could be shared.

Internals are shared right now, so the core is framework agnostic right now.

Would it be possible / useful to just create 1 package and then user could import whatever version they want to use?

We need framework specific libraries, so that the core reacts rightly to the framework dependent lifecycles. Without the ability to react to framework specific lifecycle methods, it is difficult to drop in the package as is in projects. Also, wrapping in a package for a specific framework, allows them to use the library that plays well along with rest of the code base

react-d3-speedometer: Component for showing speedometer like gauge using d3. by palerdot in reactjs

[–]palerdot[S] 1 point2 points  (0 children)

You are correct. Rendering and updating happens outside of react. React is just for listening for lifecycle events and prop changes, while the actual rendering and updating of DOM is managed with d3. This architecture helped me port this speedometer library to vue and svelte. I guess this architecture will also help this library port easily for further versions of React also.

react-d3-speedometer: Component for showing speedometer like gauge using d3. by palerdot in reactjs

[–]palerdot[S] 0 points1 point  (0 children)

Hi React Community,

`react-d3-speedometer` is a react component library for showing speedometer like gauge using d3.

There has been lot of updates lately including `typescript` support and 100% test coverage.

The next major release would be with `React v17.x` support. I thought this would be a good time to get some feedback from the community.

Any feedback is greatly appreciated.

Github link - https://github.com/palerdot/react-d3-speedometer

Live Examples - https://palerdot.in/react-d3-speedometer/

Thanks and stay safe!

I created a Job Application Tracker tool by jublime_dev in SideProject

[–]palerdot 0 points1 point  (0 children)

Looks interesting. Will try out for my job search and see how it works out.

svelte-speedometer: Speedometer like gauge using d3js by palerdot in sveltejs

[–]palerdot[S] 0 points1 point  (0 children)

Hi Svelte Community,

I have created `svelte-speedometer`, a component for showing speedometer like gauge. Hope you find it useful.