Skip to content

Instantly share code, notes, and snippets.

@udaypandey
udaypandey / Slow Render - Problem Statement 1
Created October 16, 2025 13:11
Slow Render - Problem Statement 1
import { useState } from 'react';
export default function App() {
return (
<>
<VerySlowComponent />
<BunchOfStuff />
<OtherStuffAlsoComplicated />
</>
);
import { useState } from 'react';
import { BunchOfStuff, OtherStuffAlsoComplicated } from './components/mocks';
import { VerySlowComponent } from './components/very-slow-component';
import './styles.scss';
const MovingBlock = ({ position }: { position: number }) => (
<div className="movable-block" style={{ top: position }}>
{position}
</div>
import { useState } from 'react';
export default function App() {
// add some state
const [isOpen, setIsOpen] = useState(false);
return (
<>
{/* add the button */}
<Button onClick={() => setIsOpen(true)}>Open dialog</Button>
query {
locations {
id
events {
id
name
location {
id
events {
id
query {
locations {
id
name
events {
id
name
}
promotions {
id
type Event {
id: String
name: String
location: Location
}
type Promotion {
id: String
name: String
location: Location
type Event {
id: String
name: String
location_id: String
}
type Promotion {
id: String
name: String
location_id: String
@udaypandey
udaypandey / Space.swift
Last active May 19, 2023 07:39
Spacing System in Swift
import Foundation
// Option 1
public enum Space {}
extension Space {
public static let four: CGFloat = 4
public static let eight: CGFloat = 8
public static let twelve: CGFloat = 12
@udaypandey
udaypandey / message.swift
Last active November 23, 2022 13:43
Swift Callback to message conversion
//
// SampleDelegateWrapper.swift
// Plugin
//
// Created by Uday Pandey on 18/11/2022.
//
import Foundation
enum ZigbeePeripheral {}
@udaypandey
udaypandey / xcode.openssl.log
Created February 11, 2022 11:23
Openssl Issue
dyld[10976]: Library not loaded: @rpath/openssl.framework/openssl
Referenced from: /private/var/containers/Bundle/Application/18542682-F42D-4D3B-A97E-C6DE7C019E93/Garrison.app/Frameworks/AppCoreWrapper.framework/AppCoreWrapper
Reason: tried: '/usr/lib/swift/openssl.framework/openssl' (no such file), '/private/var/containers/Bundle/Application/18542682-F42D-4D3B-A97E-C6DE7C019E93/Garrison.app/Frameworks/openssl.framework/openssl' (no such file), '/private/var/containers/Bundle/Application/18542682-F42D-4D3B-A97E-C6DE7C019E93/Garrison.app/Frameworks/AppCoreWrapper.framework/Frameworks/openssl.framework/openssl' (code signature in <4F288B6D-CF91-349E-B898-2D971560B5E2> '/private/var/containers/Bundle/Application/18542682-F42D-4D3B-A97E-C6DE7C019E93/Garrison.app/Frameworks/AppCoreWrapper.framework/Frameworks/openssl.framework/openssl' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.), '/private/var/containers/Bundle/Application/18542682-F42