Use block comment syntax for the multiline notes
CLAUDE.md reserves `//` for single-line comments. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,8 +73,10 @@ export function Outer({
|
||||
setIsOpen(false)
|
||||
|
||||
try {
|
||||
// Nested rather than `&&`: React Compiler cannot lower a logical
|
||||
// expression in a test position inside a `try`.
|
||||
/*
|
||||
* Nested rather than `&&`: React Compiler cannot lower a logical
|
||||
* expression in a test position inside a `try`.
|
||||
*/
|
||||
if (cb) {
|
||||
if (typeof cb === 'function') {
|
||||
// This timeout ensures that the callback runs at the same time as it would on native. I.e.
|
||||
|
||||
@@ -221,8 +221,10 @@ function DialogInner({
|
||||
const onPressSave = useCallback(async () => {
|
||||
setImageError('')
|
||||
setDisplayNameTooShort(false)
|
||||
// Hoisted above the `try`: React Compiler cannot lower a conditional
|
||||
// expression inside one.
|
||||
/*
|
||||
* Hoisted above the `try`: React Compiler cannot lower a conditional
|
||||
* expression inside one.
|
||||
*/
|
||||
const updatedMessage = isCurateList
|
||||
? _(msg({message: 'User list updated', context: 'toast'}))
|
||||
: _(msg({message: 'Moderation list updated', context: 'toast'}))
|
||||
|
||||
@@ -450,9 +450,11 @@ function DialogInner({
|
||||
const feedRkey = useMemo(() => new AtUri(info.uri).rkey, [info.uri])
|
||||
|
||||
const onToggleLiked = async () => {
|
||||
// Hoisted out of the `try`: React Compiler cannot lower a logical
|
||||
// expression in a test position there, and the `else` below rules out
|
||||
// splitting this into nested ifs.
|
||||
/*
|
||||
* Hoisted out of the `try`: React Compiler cannot lower a logical
|
||||
* expression in a test position there, and the `else` below rules out
|
||||
* splitting this into nested ifs.
|
||||
*/
|
||||
const shouldUnlike = isLiked && likeUri
|
||||
try {
|
||||
playHaptic()
|
||||
|
||||
@@ -94,8 +94,10 @@ export function StepFinished() {
|
||||
}
|
||||
}
|
||||
|
||||
// Hoisted above the `try`: React Compiler cannot lower these inside one, and
|
||||
// `listItems` is already settled by the earlier try/catch.
|
||||
/*
|
||||
* Hoisted above the `try`: React Compiler cannot lower these inside one, and
|
||||
* `listItems` is already settled by the earlier try/catch.
|
||||
*/
|
||||
const followDids = [
|
||||
BSKY_APP_ACCOUNT_DID,
|
||||
...(listItems?.map(i => i.subject.did) ?? []),
|
||||
|
||||
@@ -64,8 +64,10 @@ export function Header({
|
||||
const onTogglePinned = async () => {
|
||||
playHaptic()
|
||||
|
||||
// Hoisted above the `try`: inside it, `pinned` is `!savedFeedConfig.pinned`,
|
||||
// which is `!isPinned` on the branch that uses this.
|
||||
/*
|
||||
* Hoisted above the `try`: inside it, `pinned` is `!savedFeedConfig.pinned`,
|
||||
* which is `!isPinned` on the branch that uses this.
|
||||
*/
|
||||
const pinnedMessage = !isPinned
|
||||
? _(msg`Pinned to your feeds`)
|
||||
: _(msg`Unpinned from your feeds`)
|
||||
|
||||
@@ -22,9 +22,11 @@ export function OpenCameraBtn({disabled, onAdd}: OpenCameraBtnProps) {
|
||||
const mediaGranted = mediaPermissionRes?.granted
|
||||
const mediaCanAskAgain = mediaPermissionRes?.canAskAgain
|
||||
|
||||
// No useCallback: with the diagnostics above resolved this component compiles,
|
||||
// so React Compiler memoizes it, and the hand-written deps were what it could
|
||||
// not preserve.
|
||||
/*
|
||||
* No useCallback: with the diagnostics above resolved this component compiles,
|
||||
* so React Compiler memoizes it, and the hand-written deps were what it could
|
||||
* not preserve.
|
||||
*/
|
||||
const onPressTakePicture = async () => {
|
||||
try {
|
||||
if (!(await requestCameraAccessIfNeeded())) {
|
||||
|
||||
@@ -131,8 +131,10 @@ export function ComposerPrompt() {
|
||||
},
|
||||
]
|
||||
|
||||
// Statement form rather than a ternary: React Compiler cannot lower a
|
||||
// conditional expression inside a `try`, and `imageUris` is built here.
|
||||
/*
|
||||
* Statement form rather than a ternary: React Compiler cannot lower a
|
||||
* conditional expression inside a `try`, and `imageUris` is built here.
|
||||
*/
|
||||
let nativeImageUris
|
||||
if (IS_NATIVE) {
|
||||
nativeImageUris = imageUris
|
||||
|
||||
@@ -79,9 +79,11 @@ export function UserBanner({
|
||||
|
||||
try {
|
||||
if (IS_NATIVE) {
|
||||
// Nested rather than `?.()`: React Compiler cannot lower an optional
|
||||
// call inside a `try`. Like `?.()`, this leaves the arguments
|
||||
// unevaluated when the callback is absent.
|
||||
/*
|
||||
* Nested rather than `?.()`: React Compiler cannot lower an optional
|
||||
* call inside a `try`. Like `?.()`, this leaves the arguments
|
||||
* unevaluated when the callback is absent.
|
||||
*/
|
||||
if (onSelectNewBanner) {
|
||||
onSelectNewBanner(
|
||||
await compressIfNeeded(
|
||||
|
||||
Reference in New Issue
Block a user