├── .gitignore ├── README.md ├── docs ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierignore ├── .prettierrc ├── README.md ├── babel.config.js ├── blog │ ├── 2019-05-28-first-blog-post.md │ ├── 2019-05-29-long-blog-post.md │ ├── 2021-08-01-mdx-blog-post.mdx │ ├── 2021-08-26-welcome │ │ ├── docusaurus-plushie-banner.jpeg │ │ └── index.md │ ├── authors.yml │ └── tags.yml ├── docs │ ├── core-concepts │ │ ├── _category_.json │ │ ├── congratulations.md │ │ └── markdown-features.mdx │ ├── getting-started │ │ ├── _category_.json │ │ ├── installation.mdx │ │ └── quick-start.md │ ├── hooks │ │ ├── _category_.json │ │ ├── useClipboard.mdx │ │ ├── usePrevious.mdx │ │ └── useToggle.mdx │ └── utils │ │ ├── _category_.json │ │ └── hasKey.md ├── docusaurus.config.ts ├── eslint.config.mjs ├── package-lock.json ├── package.json ├── sidebars.ts ├── src │ ├── components │ │ ├── HomepageFeatures │ │ │ ├── index.tsx │ │ │ └── styles.module.css │ │ └── Tabs │ │ │ └── Tabs.tsx │ ├── css │ │ └── custom.css │ ├── pages │ │ ├── index.module.css │ │ ├── index.tsx │ │ └── markdown-page.md │ └── utils │ │ └── routes.ts ├── static │ ├── .nojekyll │ └── img │ │ ├── docusaurus-social-card.jpg │ │ ├── docusaurus.png │ │ ├── favicon.ico │ │ ├── logo.svg │ │ ├── rsu.jpg │ │ ├── undraw_docusaurus_mountain.svg │ │ ├── undraw_docusaurus_react.svg │ │ └── undraw_docusaurus_tree.svg ├── tsconfig.json └── yarn.lock ├── package-lock.json ├── package.json ├── package ├── .github │ └── workflows │ │ └── ci.yml ├── .gitignore ├── .watchmanconfig ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── jest.config.js ├── package-prod.json ├── package.json ├── src │ ├── hooks │ │ ├── index.ts │ │ ├── useClipboard │ │ │ ├── useClipboard.test.ts │ │ │ └── useClipboard.ts │ │ ├── useCountdown │ │ │ ├── useCountdown.test.ts │ │ │ └── useCountdown.ts │ │ ├── useLocalStorage │ │ │ ├── useLocalStorage.test.ts │ │ │ └── useLocalStorage.ts │ │ ├── usePrevious │ │ │ ├── usePrevious.test.ts │ │ │ └── usePrevious.ts │ │ ├── useToggle │ │ │ ├── useToggle.test.ts │ │ │ └── useToggle.ts │ │ ├── useUnmount │ │ │ ├── useUnmount.test.ts │ │ │ └── useUnmount.ts │ │ └── useWindowSize │ │ │ ├── useWindowSize.test.ts │ │ │ └── useWindowSize.ts │ ├── index.ts │ ├── services │ │ ├── common-error.ts │ │ ├── common-services.ts │ │ └── error-handler.service.ts │ ├── types │ │ ├── index.d.ts │ │ ├── useClipboard.d.ts │ │ ├── useCountdown.d.ts │ │ ├── usePrevious.d.ts │ │ ├── useToggle.d.ts │ │ ├── useUnmount.d.ts │ │ └── utils │ │ │ ├── function │ │ │ ├── clamp.d.ts │ │ │ ├── hasKey.d.ts │ │ │ ├── isNull.d.ts │ │ │ ├── isUndefined.d.ts │ │ │ ├── sample.d.ts │ │ │ ├── throttle.d.ts │ │ │ └── uniqueArray.d.ts │ │ │ ├── sleep.d.ts │ │ │ ├── string │ │ │ └── toUpperCase.d.ts │ │ │ └── toLower.d.ts │ └── utils │ │ ├── function │ │ ├── add.ts │ │ ├── clamp │ │ │ ├── clamp.test.ts │ │ │ └── clamp.ts │ │ ├── hasKey │ │ │ ├── hasKey.test.ts │ │ │ └── hasKey.ts │ │ ├── index.ts │ │ ├── isNull │ │ │ ├── isNull.test.ts │ │ │ └── isNull.ts │ │ ├── isUndefined │ │ │ ├── isUndefined.test.ts │ │ │ └── isUndefined.ts │ │ ├── sample │ │ │ ├── sample.test.ts │ │ │ └── sample.ts │ │ ├── sleep │ │ │ ├── sleep.test.ts │ │ │ └── sleep.ts │ │ ├── throttle │ │ │ ├── throttle.test.ts │ │ │ └── throttle.ts │ │ └── uniqueArray │ │ │ ├── uniqueArray.test.ts │ │ │ └── uniqueArray.ts │ │ ├── index.ts │ │ └── string │ │ ├── index.ts │ │ ├── toLower │ │ ├── toLower.test.ts │ │ └── toLower.ts │ │ └── toUpperCase │ │ ├── toUpperCase.test.ts │ │ └── toUpperCase.ts ├── tsconfig.json └── tsup.config.ts ├── smart-app ├── .gitignore ├── README.md ├── eslint.config.js ├── index.html ├── package-lock.json ├── package.json ├── public │ └── vite.svg ├── src │ ├── App.css │ ├── App.tsx │ ├── assets │ │ └── react.svg │ ├── components │ │ ├── common │ │ │ └── section-wrapper.tsx │ │ └── hooks │ │ │ ├── UseClipboard.tsx │ │ │ ├── UseCountdown.tsx │ │ │ ├── UseLocalStorage.tsx │ │ │ └── UsePrevious.tsx │ ├── index.css │ ├── main.tsx │ └── vite-env.d.ts ├── tailwind.config.js ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.node.json ├── vite.config.ts └── yarn.lock └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | ⚠️ This library is in beta version might be all hooks are not yet ready! we will soon dispatch hooks with bulletproof tests 🚀 4 |
5 | 6 |
10 |
11 |
Copied: {copiedText}
} 34 |Copied: {copiedText}
} 59 |Current count: {count}
35 |Previous count: {prevCount}
36 | 37 |Current count: {count}
63 |Previous count: {prevCount}
64 | 65 |docs
directory.
31 | >
32 | ),
33 | },
34 | {
35 | title: 'Powered by React',
36 | Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
37 | description: (
38 | <>
39 | Extend or customize your website layout by reusing React. Docusaurus can
40 | be extended while reusing the same header and footer.
41 | >
42 | ),
43 | },
44 | ];
45 |
46 | function Feature({ title, Svg, description }: FeatureItem) {
47 | return (
48 | {description}
55 |{siteConfig.tagline}
21 |3 | ⚠️ This library is in beta version might be all hooks are not yet ready! we will soon dispatch hooks with bulletproof tests 🚀 4 |
5 | 6 |
10 |
11 |
Copied: {copiedText}
} 22 |24 | Time remaining: {typeof timeLeft} {timeLeft} seconds 25 |
26 | ) : ( 27 |Countdown is not active.
28 | )} 29 |Check the localstorage to see the result
14 |Current count: {count}
16 |Previous count: {prevCount}
17 | 18 | > 19 | ); 20 | } 21 | 22 | export default UsePrevious; 23 | -------------------------------------------------------------------------------- /smart-app/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; 7 | line-height: 1.5; 8 | font-weight: 400; 9 | 10 | color-scheme: light dark; 11 | color: rgba(255, 255, 255, 0.87); 12 | background-color: #242424; 13 | 14 | font-synthesis: none; 15 | text-rendering: optimizeLegibility; 16 | -webkit-font-smoothing: antialiased; 17 | -moz-osx-font-smoothing: grayscale; 18 | } 19 | 20 | a { 21 | font-weight: 800; 22 | color: rgba(255, 255, 255, 0.87); 23 | font-size: 2.4rem; 24 | text-decoration: underline; 25 | } 26 | a:hover { 27 | color: #535bf2; 28 | } 29 | 30 | body { 31 | margin: 0; 32 | } 33 | 34 | h1 { 35 | font-size: 3.2em; 36 | line-height: 1.1; 37 | } 38 | 39 | button { 40 | border-radius: 8px; 41 | border: 1px solid transparent; 42 | padding: 0.6em 1.2em; 43 | font-size: 1em; 44 | font-weight: 500; 45 | font-family: inherit; 46 | background-color: #1a1a1a; 47 | cursor: pointer; 48 | transition: border-color 0.25s; 49 | } 50 | button:hover { 51 | border-color: #646cff; 52 | } 53 | button:focus, 54 | button:focus-visible { 55 | outline: 4px auto -webkit-focus-ring-color; 56 | } 57 | 58 | @media (prefers-color-scheme: light) { 59 | :root { 60 | color: #213547; 61 | background-color: #ffffff; 62 | } 63 | a:hover { 64 | color: #747bff; 65 | } 66 | button { 67 | background-color: #f9f9f9; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /smart-app/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import App from './App.tsx' 4 | import './index.css' 5 | 6 | createRoot(document.getElementById('root')!).render( 7 |