@eliseubatista99/react-scaffold-core 0.2.19 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,6 +10,20 @@ A library which provides basic components, hooks, helpers and providers to easil
10
10
  npm i @eliseubatista99/react-scaffold-core
11
11
  ```
12
12
 
13
+ @eliseubatista99/react-scaffold-core is a React library that provides basic components, hooks, helpers and providers to easily build a React application and avoid repeating the usual code.
14
+
15
+ It helps you write applications that behave consistently and are easy to test.
16
+
17
+ You can use this library together with any other library.
18
+
19
+ ## Installation
20
+
21
+ The recommended way is to install this package as soon as you start a new application with React.
22
+
23
+ ```
24
+ npm i @eliseubatista99/react-scaffold-core
25
+ ```
26
+
13
27
  ## Content
14
28
 
15
29
  - [Providers](https://github.com/eliseubatista99/react-scaffold/tree/main/src/packages/core/src/providers): Useful providers to handle complex actions like navigation and showing, hiding and managing feedback components;
@@ -19,3 +33,7 @@ npm i @eliseubatista99/react-scaffold-core
19
33
  - [Helpers](https://github.com/eliseubatista99/react-scaffold/tree/main/src/packages/core/src/helpers): Classes to help with generic repetitive tasks, like transforming a string into Pascal Case.
20
34
 
21
35
  - [Components](https://github.com/eliseubatista99/react-scaffold/tree/main/src/packages/core/src/components): Basic, customizable components with pre-configured styles and behaviors.
36
+
37
+ ## Change Log
38
+
39
+ Every release, along with the migration instructions, is documented on the GitHub [Releases](https://github.com/eliseubatista99/react-scaffold/releases) page.
@@ -1,9 +1,13 @@
1
1
  type runFetchOptions = Record<string, any>;
2
+ type FetchOutput<TOut> = {
3
+ result: TOut;
4
+ statusCode: number;
5
+ };
2
6
  export declare const useFetch: () => {
3
- get: <OutputType>(endpointUrl: string, options?: runFetchOptions, headers?: HeadersInit) => Promise<OutputType>;
4
- post: <OutputType>(endpointUrl: string, options?: runFetchOptions, headers?: HeadersInit) => Promise<OutputType>;
5
- put: <OutputType>(endpointUrl: string, options?: runFetchOptions, headers?: HeadersInit) => Promise<OutputType>;
6
- patch: <OutputType>(endpointUrl: string, options?: runFetchOptions, headers?: HeadersInit) => Promise<OutputType>;
7
- delete: <OutputType>(endpointUrl: string, options?: runFetchOptions, headers?: HeadersInit) => Promise<OutputType>;
7
+ get: <OutputType>(endpointUrl: string, options?: runFetchOptions, headers?: HeadersInit) => Promise<FetchOutput<OutputType>>;
8
+ post: <OutputType>(endpointUrl: string, options?: runFetchOptions, headers?: HeadersInit) => Promise<FetchOutput<OutputType>>;
9
+ put: <OutputType>(endpointUrl: string, options?: runFetchOptions, headers?: HeadersInit) => Promise<FetchOutput<OutputType>>;
10
+ patch: <OutputType>(endpointUrl: string, options?: runFetchOptions, headers?: HeadersInit) => Promise<FetchOutput<OutputType>>;
11
+ delete: <OutputType>(endpointUrl: string, options?: runFetchOptions, headers?: HeadersInit) => Promise<FetchOutput<OutputType>>;
8
12
  };
9
13
  export {};