Flexible Sorting Convention for Hook File Name Structure #2042
christopherreay
started this conversation in
Other
Replies: 2 comments
-
Interesting idea, can you give some examples of "put useful things in the ignored space"? 👀 |
Beta Was this translation helpful? Give feedback.
0 replies
-
specifically what i would do is put the hooks and pages in alphabetical
order. i might also add further descriptions if there are cross cutting
dimensions through the code base
…On Thu, 2 Jan 2025, 00:10 Rom, ***@***.***> wrote:
Interesting idea, can you give some examples of "put useful things in the
ignored space"? 👀
—
Reply to this email directly, view it on GitHub
<#2042 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB2PPTNNNF76NCM3WTVXL32IRDSXAVCNFSM6AAAAABUOPJAZSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNZRGIYDONQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Im looking at transitioning onto here, having been dropped into a next.js project, I can see it is designed by vercel to ... basically require developers to use server resources and be as opaque as possible.
So, this looks ... "deverlopery", which is a high compliment where I am currently buried in the react space.
Soooo.. oh, yes, something I use in my smart contract deployment platform, is a convention of file names which is similar to the hooks here, but with one difference.
so the regex for your hook files is
\+<hookname>\.<extension>
if you change it to
\+(?:<ignored>[a-zA-Z0-0_- etc]+\.)*<hookname>\.<extension>
you can put useful things in the ignored space.... the example that I use all the time, is the order that the hooks are fired. This change is backwards compatible, and allows people to organise their files however they want in the explorer.
Beta Was this translation helpful? Give feedback.
All reactions