Merge branch 'main' into new-nav

This commit is contained in:
Dan Abramov
2022-11-21 15:54:51 +00:00
5 changed files with 3 additions and 12 deletions

View File

@@ -64,7 +64,6 @@ function CollapseWrapper({
className={cn(isExpanded ? 'opacity-100' : 'opacity-50')}
style={{
transition: `opacity ${duration}ms ease-in-out`,
animation: `nav-fadein ${duration}ms ease-in-out`,
}}>
<div {...getCollapseProps()}>{children}</div>
</div>

View File

@@ -100,7 +100,7 @@ This lets you avoid running potentially expensive formatting logic unless the co
### `useDebugValue(value, format?)` {/*usedebugvaluevalue-format*/}
Call `useContext` at the top level of your [custom Hook](/learn/reusing-logic-with-custom-hooks) to display a readable debug value:
Call `useDebugValue` at the top level of your [custom Hook](/learn/reusing-logic-with-custom-hooks) to display a readable debug value:
```js
import { useDebugValue } from 'react';

View File

@@ -1664,6 +1664,7 @@ function useAnimationLoop(isRunning, drawFrame) {
}
const startTime = performance.now();
let frameId = null;
function tick(now) {
const timePassed = now - startTime;

View File

@@ -153,15 +153,6 @@
display: none;
}
@keyframes nav-fadein {
from {
opacity: 0.5;
}
to {
opacity: 1;
}
}
/*
* Hopefully when scrollbar-color lands everywhere,
* (and not just in FF), we'll be able to keep just this.

View File

@@ -125,7 +125,7 @@ When called, it should examine `this.props` and `this.state` and return one of t
- **Arrays and fragments.** Let you return multiple elements from render. See the documentation on [fragments](/docs/fragments.html) for more details.
- **Portals**. Let you render children into a different DOM subtree. See the documentation on [portals](/docs/portals.html) for more details.
- **String and numbers.** These are rendered as text nodes in the DOM.
- **Booleans or `null`**. Render nothing. (Mostly exists to support `return test && <Child />` pattern, where `test` is boolean.)
- **Booleans or `null` or `undefined`**. Render nothing. (Mostly exists to support `return test && <Child />` pattern, where `test` is boolean).
The `render()` function should be pure, meaning that it does not modify component state, it returns the same result each time it's invoked, and it does not directly interact with the browser.