This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fork of https://gist.github.com/b-nnett/2749adb44566239e4c85ad1a8937c2bc | |
// origin by @B_nnett → https://twitter.com/joshm/status/1648346253355282432?s=20 | |
/* | |
To set up this boost for chat.openai.com: | |
1) open Arc browser and login at chat.openai.com. | |
2) Head over to the + button in your sidebar and select New Boost. | |
Or hit ⌘ + T and type New Boost into your Command Bar. | |
3) Click the `Code` button. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 76ad8283e5de2a0733cbac375c0c16d1d03de891 Mon Sep 17 00:00:00 2001 | |
From: James Reggio <james.reggio@gmail.com> | |
Date: Wed, 14 Feb 2018 18:57:24 -0500 | |
Subject: [PATCH] add trace statements to JSCLoadApp fn | |
--- | |
ReactCommon/cxxreact/JSCExecutor.cpp | 32 ++++++++++++++++++++++++++++++++ | |
1 file changed, 32 insertions(+) | |
diff --git a/ReactCommon/cxxreact/JSCExecutor.cpp b/ReactCommon/cxxreact/JSCExecutor.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import {Platform, StyleSheet, Text, View, StatusBar} from 'react-native'; | |
const instructions = ` | |
This app demonstrates the proposed imperative stack-manipulation methods on \`StatusBar\`. | |
`; | |
const pad = (value, width) => ( | |
`${value}${Array(width - String(value).length).fill(' ').join('')}` | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Even though CurrentEpisodeWaveform is a component class that | |
// properly composes the three HOCs with Waveform, its static | |
// properties make it appear like a `forwardRef` component type. | |
const CurrentEpisodeWaveform = compose( | |
withCurrentEpisode, | |
withEpisodeAmplitudes, | |
withSize | |
)(Waveform); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Waveform.js | |
import React, { Component } from 'react'; | |
export default class Waveform extends Component { | |
static MIN_AMPLITUDE = 0; | |
static MAX_AMPLITUDE = 100; | |
render() { | |
console.log('Received props:', Object.keys(this.props)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WrappedInput = React.forwardRef((props, ref) => ( | |
<input ref={ref} {...props} /> | |
)); | |
console.log(WrappedInput); | |
// => Object { | |
// $$typeof: Symbol(react.forward_ref), | |
// render: (props, ref) => <input ref={ref} {...props} />, | |
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// EmailInput wraps an HTML `input` and adds some app-specific styling. | |
const EmailInput = React.forwardRef((props, ref) => ( | |
<input ref={ref} {...props} type="email" className="AppEmailInput" /> | |
)); | |
class App extends Component { | |
emailRef = React.createRef(); | |
render() { | |
return ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
############################################################################### | |
# USAGE | |
############################################################################### | |
# 1. Install the `react-is` package in your project with | |
# `npm i --save react-is` or `yarn add react-is`. | |
# | |
# 2. Place this script in the root of your repository, alongside `package.json`. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ProductsQueryWithConfigurableFragment = ` | |
query { | |
products { | |
...ProductFragment | |
} | |
} | |
`; | |
const SlimProductFragment = ` | |
fragment ProductFragment on Product { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RangeError: Maximum call stack size exceeded | |
at Array.forEach (native) | |
at merge (blob:file:///71f10210-bc6a-4c31-bb2d-281064e4b98f:64781:24) | |
at blob:file:///71f10210-bc6a-4c31-bb2d-281064e4b98f:64787:11 | |
at Array.forEach (native) | |
at merge (blob:file:///71f10210-bc6a-4c31-bb2d-281064e4b98f:64781:24) | |
at blob:file:///71f10210-bc6a-4c31-bb2d-281064e4b98f:64787:11 | |
at Array.forEach (native) | |
at merge (blob:file:///71f10210-bc6a-4c31-bb2d-281064e4b98f:64781:24) | |
at blob:file:///71f10210-bc6a-4c31-bb2d-281064e4b98f:64787:11 |
NewerOlder