Skip to content

Instantly share code, notes, and snippets.

import { ErrorBoundary } from 'react-error-boundary'
export const Component = () => (
<ErrorBoundary fallback={<p>Something went wrong ...</p>}>
<Suspense fallback={<p>Downloading ...</p>}>
<Component />
</Suspense>
</ErrorBoundary>
)
@antklim
antklim / .babelrc
Last active February 28, 2024 04:25
UI Lib
{
"presets": ["module:metro-react-native-babel-preset"],
"plugins": ["react-require"]
}
type ReducerState = {
count: number;
};
type ReducerAction =
| {
type: "add";
add: number;
}
| {
type OverrideProps<T, TOverridden> = Omit<T, keyof TOverridden> & TOverridden;
import * as Sentry from "npm:@sentry/node";
const SENTRY_DSN = Deno.env.get("SENTRY_DSN");
if (SENTRY_DSN) {
Sentry.init({
dsn: SENTRY_DSN,
tracesSampleRate: 1.0,
});
}
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
commit-message:
prefix: chore
- package-ecosystem: npm
class SuperCliTool < Formula
desc "Super CLI Tool Release"
homepage "https://github.com/user/super-cli-tool.git"
version "0.2.1"
on_macos do
on_arm do
url "https://github.com/user/super-cli-tool/releases/download/v0.2.1/super-cli-tool-darwin-arm64.tar.gz"
sha256 "c02e55f13d41067e114eede25441d066da994a5800be770388694d0b82967fc8"
branches:
- '+([0-9])?(.{+([0-9]),x}).x' # maintenance branches like 1.x, 2.0.x, etc
- main
- name: beta
prerelease: true
- name: 'feat/*'
channel: 'feat-${name.replace(/^feat\//, "")}' # name is a branch name
prerelease: 'feat-${name.replace(/^feat\//, "")}'
plugins:
name: Release
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup repo
{
"tasks": {
"start": "deno run --allow-env=PORT --allow-net main.ts"
}
}