add clientLoader option to createRoutesStub #13539
Visible-Radio
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While working in Storybook to prove out ideas before adding them to an app, I wanted to stub out both a clientLoader and a loader for a route.
The use case is this:
The loader returns a column recipe and the data to display in a table. The table columns are config based and come from a docker file mount or a DB.
The client loader gets both the column recipe and data. It digests the recipe, which may contain references to scripts that need to be fetched.
These scripts aren't part of the app. They don't get bundled. They're an escape hatch to allow us to map arbitrary customer data to the input props of a set of cell renderers the app makes available. This allows us to create and modify tables without shipping built code coupled to the shape of the table data. Basic tables don't need any of these scripts. In order to enable using special components (charts, chips / tags, etc) inside cells without knowing the table structure at build time, we want to leave the option open to use custom transforms post build.
I figured I'd be able to workshop the overall flow of this idea in storybook using createRoutesStub, but it appears to be missing
clientLoader
.Beta Was this translation helpful? Give feedback.
All reactions