How do I get Tailwind’s active breakpoint in JavaScript?

From the tailwind docs, you can import your config from the tailwindcss node module: import resolveConfig from ‘tailwindcss/resolveConfig’ import tailwindConfig from ‘./tailwind.config.js’ const fullConfig = resolveConfig(tailwindConfig) fullConfig.theme.width[4] // => ‘1rem’ fullConfig.theme.screens.md // => ‘768px’ fullConfig.theme.boxShadow[‘2xl’] // => ‘0 25px 50px -12px rgba(0, 0, 0, 0.25)’ As you can see above, you can get your breakpoints … Read more

Why is my favicon not working in my next js app?

Put the favicons in an /image directory inside the /public directory and put the code below in your _app.js <Head> <link rel=”shortcut icon” href=”/images/favicon.ico” /> <link rel=”apple-touch-icon” sizes=”180×180″ href=”/images/apple-touch-icon.png” /> <link rel=”icon” type=”image/png” sizes=”32×32″ href=”/images/favicon-32×32.png”/> <link rel=”icon” type=”image/png” sizes=”16×16″ href=”/images/favicon-16×16.png”/> </Head>

Invalidate queries doesn’t work [React-Query]

Also, there is one more reason that was not mentioned before: If you used enabled option in useQuery than such queries are ignored by invalidateQueries. From docs: https://tanstack.com/query/latest/docs/react/guides/disabling-queries The query will ignore query client invalidateQueries and refetchQueries calls that would normally result in the query refetching.

TDD / BDD with React.js? [closed]

Those helped me get started: React TDD Guide Using Test Driven Development with React.js to Add Multi-Select to the Drag and Drop Component React TDD Example: Unit Testing and Building a React Component With Jest, Gulp and React Test Utils Testing Flux Applications Awesome React – testing Also worth looking at Shallow Rendering

React hooks useCallback with parameters inside loop

The simple answer here is, you probably shouldn’t use useCallback here. The point of useCallback is to pass the same function instance to optimized components (e.g. PureComponent or React.memoized components) to avoid unnecessary rerenders. You’re not dealing with optimized components in this case (or most cases, I’d suspect) so there’s not really a reason to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)