Replies: 1 comment
-
#2861 closes this. The next release should have this exposed. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
We built our own
useTabs
for our developers to use when they create a new page/route so we can create a common structure for all pages across our product. useTabs generates info that flows into aPageHeader
component to fill in a standard layout, our original attempt with TypeScript caused unions that were too complex, which we could work around with currying, but is an awkward unnecessary API.Then we found
CheckFromPath
, but it doesn't appear as a top level import, this seems really useful for this and other use cases when building on top of TSR - can we have this or another similar helper type surfaced? Or can our approach be iterated on to not use this internal type helper ya think?Thanks for reading <3
cc @honzahruby
Code
Previous attempt at useTabs that made TS angry:
With
CheckFromPath
which simplifies the types, seems to perform better, and removes our errors:Beta Was this translation helpful? Give feedback.
All reactions