- ✅ Ticket 1.1: Estructura Clean Architecture en backend - ✅ Ticket 1.2: Schemas Zod compartidos - ✅ Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares) - ✅ Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares) - ✅ Ticket 1.5: Eliminación de duplicidades (~50 líneas) Cambios principales: - Creada estructura Clean Architecture en backend/src/ - Schemas Zod compartidos en backend/src/shared/schemas/ - Refactorización modular de drugs y procedures - Utilidades genéricas en src/utils/ (filter, validation) - Eliminados scripts obsoletos y documentación antigua - Corregidos errores: QueryClient, import test-error-handling - Build verificado y funcionando correctamente
45 lines
866 B
Markdown
45 lines
866 B
Markdown
react-style-singleton
|
|
====
|
|
|
|
__300b__ with all dependencies, minified and gzipped
|
|
|
|
|
|
Creates a style component with internal _tracker_.
|
|
- Adds styles to the browser on the __first__ instance mount.
|
|
- Removes after the __last__ instance unmount.
|
|
- Thus helps you deliver styles you need to the customer, and clean up later.
|
|
- Is not server-side rendering compatible!
|
|
|
|
|
|
# API
|
|
|
|
## Component
|
|
|
|
```js
|
|
import {styleSingleton} from 'react-style-singleton'
|
|
|
|
const Style = styleSingleton();
|
|
|
|
export const App = () => (
|
|
<Style styles={'body {color:red}'} />
|
|
);
|
|
```
|
|
|
|
## Hook
|
|
|
|
```js
|
|
import {styleHookSingleton} from 'react-style-singleton';
|
|
|
|
const useStyle = styleHookSingleton();
|
|
const useAnotherStyle = styleHookSingleton();
|
|
|
|
export const App = () => {
|
|
useStyle('div {color:red}');
|
|
useAnotherStyle('body { background-color:red }');
|
|
return (<div />);
|
|
}
|
|
```
|
|
|
|
# License
|
|
|
|
MIT |