Skip to content

[Feature Request] hooks 🪝 #22

Open
@cpreston321

Description

@cpreston321

Pain Point

I was trying to find a good way of getting a of if(isCancel(res)) in favor for hooks that can be wrapped for a better DX.

If the developer had more control over the hooks it can be more easily customized, intercept events and more.

"clark:input:cancel": () => {//... code here for exit }

I have a working POC on my local computer but I first wanted to see if it's viable to do so.

Additionally you could have other hooks for "clark:init", "clark:input:submit" and pass or modify additional parameters if need be or in the future create custom ways for users to create there own "preset" of the theme using clack.

Implementation ways

  • could do it a custom implementation
  • use unjs/hookable (current working implementation).

Let me know what you think. @natemoo-re.

Thanks,
CP

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Needs triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions