Skip to content

Commit 6c9548a

Browse files
committed
docs: Add local markdown docs references to instructions
1 parent 1c2dd83 commit 6c9548a

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/copilot-instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
- Use [@data-client/react guide](.github/instructions/react.instructions.md) for React.
33
- Use [@data-client/test guide](.github/instructions/test.instructions.md) when writing tests.
44
- Use [@data-client/manager guide](.github/instructions/manager.instructions.md) when writing custom Managers for @data-client/react.
5+
- Use markdown files in the [API docs](docs/core/api) directory to validate API usage.
6+
- Use markdown files in the [guides](docs/core/guides) directory to help with more specific use cases.
7+
- use markdown files in the [REST](docs/rest) directory to help building REST APIs.
58
- If you are not sure about file content or codebase structure pertaining to the user’s request, use your tools to read files and gather the relevant information: do NOT guess or make up an answer.
69
- Place API definitions and custom managers in the 'resources' directory.

.github/instructions/manager.instructions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ applyTo: '**/*.ts'
66
[Managers](https://dataclient.io/docs/api/Manager) are singletons that handle global side-effects. Kind of like useEffect() for the central data store.
77
They interface with the store using [Controller](https://dataclient.io/docs/api/Controller), and [redux middleware](https://redux.js.org/tutorials/fundamentals/part-4-store#middleware) is run in response to [actions](https://dataclient.io/docs/api/Actions).
88

9+
Use [Manager API docs](docs/core/api/Manager.md) to validate usage.
10+
11+
Always use `actionTypes` when comparing action.type. Refer to [Action API docs](docs/core/api/Actions.md)
12+
for list of actions and their payloads.
13+
914
## Dispatching actions
1015

1116
[Controller](https://dataclient.io/docs/api/Controller) has dispatchers:

.github/instructions/test.instructions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ type Interceptor = ResponseInterceptor | FetchInterceptor;
8787

8888
# Official Documentation Links
8989

90-
- [Fixtures and Interceptors](https://dataclient.io/docs/api/Fixtures)
91-
- [renderDataHook()](https://dataclient.io/docs/api/renderDataHook)
90+
- [Fixtures and Interceptors](https://dataclient.io/docs/api/Fixtures) or [Fixtures and Interceptors](docs/core/api/Fixtures.md)
91+
- [renderDataHook()](https://dataclient.io/docs/api/renderDataHook) or [renderDataHook()](docs/core/api/renderDataHook.md)
92+
- [MockResolver](docs/core/api/MockResolver.md)
93+
- [makeRenderDataHook()](docs/core/api/makeRenderDataHook.md)
9294

9395
**ALWAYS follow these patterns and refer to the official docs for edge cases.**

0 commit comments

Comments
 (0)