Create an Angular injectAppTable/createAppColumnHelper abstraction with shared features/defaults, registered components, injectTableContext/injectTableCellContext/injectTableHeaderContext, and correct FlexRender component-versus-function handling.
60
70%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./packages/angular-table/skills/create-table-hook/SKILL.mdThis skill builds on @tanstack/table-core#core, getting-started, and table-state. Use it for repeated app conventions; keep one-off tables on injectTable.
import {
createTableHook,
rowSortingFeature,
tableFeatures,
} from '@tanstack/angular-table'
export const {
injectAppTable,
createAppColumnHelper,
injectTableContext,
injectTableCellContext,
injectTableHeaderContext,
} = createTableHook({
features: tableFeatures({ rowSortingFeature }),
})const helper = createAppColumnHelper<Person>()
const columns = helper.columns([helper.accessor('name', { header: 'Name' })])
export class PeopleTable {
readonly table = injectAppTable(() => ({ columns, data: this.data() }))
}export class NameCell {
readonly cell = injectTableCellContext<string, Person>()
readonly value = computed(() => this.cell().getValue())
}Use the matching table/header/cell injector instead of threading context props through reusable components.
Register either an Angular component type or a render function. Return component types directly when FlexRender should set context inputs; use flexRenderComponent(Component, options) only for explicit inputs/outputs/injector/bindings/directives.
Wrong:
export function make() {
return injectAppTable(() => options)
}Correct:
export class PeopleTable {
readonly table = injectAppTable(() => options())
}Both app-table construction and returned context injectors require Angular injection context.
Source: packages/angular-table/src/helpers/createTableHook.ts
Wrong:
cell: (ctx) => flexRenderComponent(NameCell, { inputs: { cell: ctx.cell } })Correct:
cell: (ctx) => ctx.cell.NameCellRegistered components can consume the app hook’s typed cell context directly.
Source: docs/framework/angular/guide/composable-tables.md
Wrong:
flexRenderComponent((props) => props.cell.getValue())Correct:
;(props) => props.cell.getValue()flexRenderComponent validates an Angular component type; plain render functions are already valid render content.
Source: packages/angular-table/src/flex-render/flexRenderComponent.ts
Wrong:
const hook = createTableHook({ features: tableFeatures({}) })Correct:
readonly table = injectTable(() => ({ features, columns, data: this.data() }))Use the app hook only when shared defaults, types, or registered components justify it.
Source: docs/framework/angular/guide/composable-tables.md
Inspect node_modules/@tanstack/angular-table/dist/types/ for exact DI and rendering contracts in the bundled public API.
9e523bc
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.