apps/mobile/package.json
"expo install": "npx expo install"bash; from root
npm run "expo install" --workspace=mobile -- zustand| git_diff_summary() { | |
| # Check if the current directory is a git repository | |
| git rev-parse --is-inside-work-tree > /dev/null 2>&1 | |
| if [ $? -ne 0 ]; then | |
| echo "Not a git repository." | |
| return 1 # Exit the function if not in a git repository | |
| fi | |
| echo "Staged Changes:" | |
| local last_line_staged=$(git diff --staged --stat | tail -n 1) |
apps/mobile/package.json
"expo install": "npx expo install"bash; from root
npm run "expo install" --workspace=mobile -- zustand| import { renderHook } from "@testing-library/react"; | |
| import useInterval from "./useInterval"; | |
| describe("useInterval", () => { | |
| beforeEach(() => { | |
| jest.useFakeTimers(); | |
| }); | |
| afterEach(() => { | |
| jest.clearAllTimers(); |
| import { useEffect, useMemo, useRef } from "react"; | |
| type UseIntervalTypes = { | |
| callback: () => void; | |
| delay: number; | |
| }; | |
| /** | |
| * React lifecycle-aware implementation of setInterval. | |
| * This allows for a quick implementation of setInterval in React without having to worry about cleanup. |
| mkdirc () | |
| { | |
| mkdir -p -- "$1" && | |
| cd -P -- "$1" | |
| } |