Skip to content

Instantly share code, notes, and snippets.

View phvictorino's full-sized avatar

Pedro H. Victorino phvictorino

  • Munich
  • 17:22 (UTC +02:00)
View GitHub Profile
@phvictorino
phvictorino / useMediaQueries.ts
Created December 1, 2022 10:39
useMediaQueries
import { useEffect, useState } from 'react';
type QueryValue = {
query: string;
value: string;
};
function useMediaQueries(queriesValues: QueryValue[]): QueryValue | null {
const getMatches = (internalQueriesValues: QueryValue[]): QueryValue | null => {
// Prevents SSR issues
@phvictorino
phvictorino / .babelrc
Last active April 26, 2019 00:26
babel and eslint api
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
@phvictorino
phvictorino / .eslintrc.js
Last active April 24, 2019 21:37
config eslint vue
// http://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
sourceType: 'module',
parser: 'babel-eslint',
},
env: {