tips to evolve as a developer
developers get stuck, paralized
https://www.oreilly.com/library/view/apprenticeship-patterns/9780596806842/ch04.html
Make It Stick https://www.amazon.com.br/Make-Stick-Science-Successful-Learning/dp/0674729013
| "use client"; | |
| import * as React from "react"; | |
| import { Input } from "@/components/ui/Input"; | |
| import { Button } from "@/components/ui/Button"; | |
| import { | |
| AlertDialog, | |
| AlertDialogContent, | |
| AlertDialogHeader, | |
| AlertDialogTitle, | |
| AlertDialogDescription, |
| import React from 'react'; | |
| import { render, waitFor, screen, act } from '@testing-library/react'; | |
| import userEvent from '@testing-library/user-event'; | |
| import StackedBar from '~/pages/NewReports/Cards/StackedBar'; | |
| import { dashData } from './dashData'; | |
| let listener = null; |
| var join = require('path').join; | |
| var cp = require('child_process'); | |
| /** | |
| * Migrate a file to TypeScript. | |
| * | |
| * @example | |
| * // will rename file and try to infer types | |
| * yarn ts:migrate ./src/utils.js | |
| * |
| import { graphql } from 'react-relay'; | |
| import { getNode } from 'relay-runtime'; | |
| const ShoesListQuery = graphql` | |
| query ShoesListQuery { | |
| shoes { | |
| size | |
| type | |
| } | |
| } |
| const graphiqlBrandingTweak = { | |
| ["postgraphile:graphiql:html"](html: string) { | |
| console.log("Applying GraphiQL Branding Tweak..."); | |
| return html.replace( | |
| "</head>", | |
| `<style type="text/css"> | |
| @media (prefers-color-scheme: dark) { | |
| html { | |
| filter: invert(1) hue-rotate(180deg); | |
| } |
tips to evolve as a developer
developers get stuck, paralized
https://www.oreilly.com/library/view/apprenticeship-patterns/9780596806842/ch04.html
Make It Stick https://www.amazon.com.br/Make-Stick-Science-Successful-Learning/dp/0674729013
| import idx from 'idx'; | |
| import { ForwardFeature } from './mapboxTypes'; | |
| export interface AddressResult { | |
| id?: string | null; | |
| fullAddress?: string | null; | |
| shortAddress?: string | null; | |
| zipcode?: string | null; | |
| street?: string | null; |
| import { PixelRatio, Dimensions } from "react-native"; | |
| const isTabletLike = () => { | |
| const pixelDensity = PixelRatio.get(); | |
| const adjustedWidth = Dimensions.get("screen").width * pixelDensity; | |
| const adjustedHeight = Dimensions.get("screen").height * pixelDensity; | |
| return ( | |
| (pixelDensity < 2 && (adjustedWidth >= 1000 || adjustedHeight >= 1000)) || | |
| (pixelDensity === 2 && (adjustedWidth >= 1920 || adjustedHeight >= 1920)) | |
| ); |
| module.exports = { | |
| schema: './data/schema.graphql', | |
| language: 'typescript', | |
| src: '../.', | |
| include: [ | |
| './web/src/**', | |
| './shared/src/**', | |
| ], | |
| }; |
| RTL relay testings | |
| https://github.com/facebook/relay/blob/master/packages/relay-test-utils/__tests__/RelayMockEnvironmentWithComponents-test.js | |
| https://github.com/entria/entria-fullstack/pull/109/files | |
| Very easy native splash screen on Xcode | |
| https://medium.com/@kelleyannerose/react-native-ios-splash-screen-in-xcode-bd53b84430ec | |
| Init rn app on specific rn version | |
| (rn cli 2.0.1+) | |
| react-native-cli init --version="[email protected]" my project |