About faasjs-react-ant-design
faasjs-react-ant-design is a skill for building React interfaces with Ant Design in FaasJS projects. It outlines request handling, shared state, CRUD composition, and testing patterns.
Key features
- 01Feature-local file organization
- 02FaasJS request and streaming hooks
- 03React lifecycle and shared state guidance
- 04Reusable CRUD composition
- 05Component and request-flow testing
Use cases
- 01Building Ant Design data-entry features
- 02Choosing request handling for components
- 03Creating CRUD flows from shared metadata
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ faasjs/ faasjs --skill faasjs-react-ant-designAfter installing, type/faasjs-react-ant-designin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/guidelines/ant-design.mdcrud-patterns.mdreact-data-fetching.mdreact-testing.mdreact.mdDetails
From the project READMEFaasJS React And Ant Design
Default Workflow
- Start from feature-local files under
features/<feature>/. - Use
@faasjs/ant-designrequest exports in Ant Design apps so request errors and feedback stay consistent. - Use
useFaasfor component-owned requests,faasfor event handlers,Formfaasfor submits, anduseFaasStreamfor streaming. - Avoid native
useEffectby default; use FaasJS React lifecycle helpers for side effects and non-primitive dependencies. - Use
createProxyStatesfor shared state whose data changes must be propagated across independent components or component trees. - For CRUD, compose list, detail, create/update, and delete from shared feature metadata rather than separate one-off flows.
Load These References
- Component and hook rules:
references/guidelines/react.md. - Request flow selection and lifecycle controls:
references/guidelines/react-data-fetching.md. @faasjs/ant-designpage, route, CRUD, and feedback patterns:references/guidelines/ant-design.md.- React request-flow and component tests:
references/guidelines/react-testing.md. - Complete CRUD vertical slice composition:
references/guidelines/crud-patterns.md.
Gotchas
- Import
faas,useFaas,useFaasStream,FaasReactClient,FaasDataWrapper, andwithFaasDatafrom@faasjs/ant-designin Ant Design apps. - Import
createProxyStatesfrom@faasjs/react; create a stable feature-local state channel and export the generateduseXxx,setXxx, andxxxRefhelpers. - Destructure hook returns at the call site; do not keep broad
resultorstatesobjects. - Keep React event handlers inline by default; extract only for reuse or real boundaries.
- For object or array dependencies, use equal memo/effect helpers instead of native dependency arrays.
- Use
hiddenfor controlled field visibility andif(values)for value-dependent visibility; test visibility again when props or relevant values change. - Prefer
useStatesoruseStatesReffor component-local state, andcreateSplittingContextfor provider-scoped shared state; reach forcreateProxyStateswhen data-change notifications must cross components, regardless of where the setter is called.
Validation
- Use
vp test <pattern>for affected component, hook, or request-flow tests. - Use
setMockfor request-layer React tests. - Run
vp check --fixbefore handoff when UI files changed.
Comments
Markdown supported