GithubHelp home page GithubHelp logo

tf's Introduction

tf

to check

update all

  • npm install -g npm-check-updates && ncu -u && ncu -u -ws && npm i

corepack

astro

same result

import type { HTMLAttributes } from 'astro/types';

type Props1 = HTMLAttributes<'svg'>;
type Props2 = astroHTML.JSX.SVGAttributes;

next

zod

icons

primitives

fake data

backend

  • express, fastify, koa, hono, hapi

tailwind

react common types

  • React.ReactElement - React element (<Foo />); similar JSX.Element (deprecated) -> React.JSX.Element

  • React.ReactNode - describes anything that can be rendered - strings, numbers, elements or an array of these things

  • React.ElementType - React component (import Fooโ€ฆ)

  • html components

    • type Props = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
    • interface Props extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> { active?: boolean }
  • @types/react

    //
    // Event Handler Types
    // ----------------------------------------------------------------------
    
    type EventHandler<E extends SyntheticEvent<any>> = {
        bivarianceHack(event: E): void;
    }['bivarianceHack'];
    
    type ReactEventHandler<T = Element> = EventHandler<SyntheticEvent<T>>;
    
    type ClipboardEventHandler<T = Element> = EventHandler<ClipboardEvent<T>>;
    type CompositionEventHandler<T = Element> = EventHandler<
        CompositionEvent<T>
    >;
    type DragEventHandler<T = Element> = EventHandler<DragEvent<T>>;
    type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
    type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
    type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
    type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
    type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
    type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>;
    type PointerEventHandler<T = Element> = EventHandler<PointerEvent<T>>;
    type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>;
    type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>;
    type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent<T>>;
    type TransitionEventHandler<T = Element> = EventHandler<TransitionEvent<T>>;
  • โ€ฆ

react native

  • use expo ๐Ÿ˜‰

workflow backup

vecel.json

{
    "github": {
        "enabled": false
    }
}
name: deploy @tf/next-playground

on:
    workflow_dispatch:
    workflow_call:

jobs:
    deploy-vercel-3:
        runs-on: ubuntu-latest
        strategy:
            matrix:
                environment: [testing, production]
        steps:
            - uses: actions/checkout@v3
            - uses: uses: actions/setup-node@v3
            - run: npm install --global vercel@latest
            - name: deploy project 3 to Vercel
              run: |
                  prodRun=""
                  if [[ ${GITHUB_REF} == "refs/heads/master" ]]; then
                  prodRun="--prod"
                  fi

                  vercel --token ${VERCEL_TOKEN} $prodRun
              env:
                  VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
                  VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
                  VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_3 }}

vercel.json old react config

{
    "github": {
        "enabled": false
    },
    "cleanUrls": true,
    "trailingSlash": false,
    "rewrites": [{ "source": "/(.*)", "destination": "/" }]
}

tf's People

Contributors

tomek-f avatar crazynugatt avatar

Stargazers

Nikola R. Hristov avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

crazynugatt

tf's Issues

Eslint react refresh

warning Fast refresh only works when a file only export components. Use a new file to share constant or functions between components

typescript eslint

'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',

->

'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.