mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 09:19:16 +02:00
refactor: import jest as global; unify import style of some modules (#6898)
* refactor: import jest as global * fix react
This commit is contained in:
parent
e97dc0d37e
commit
c9ee6e467c
59 changed files with 177 additions and 139 deletions
|
@ -5,12 +5,12 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import React, {useRef} from 'react';
|
||||
import Layout from '@theme/Layout';
|
||||
import Link from '@docusaurus/Link';
|
||||
|
||||
export default function LinkTest(): JSX.Element {
|
||||
const anchorRef = React.useRef<HTMLAnchorElement>(null);
|
||||
const anchorRef = useRef<HTMLAnchorElement>(null);
|
||||
return (
|
||||
<Layout>
|
||||
<main className="container margin-vert--xl">
|
||||
|
|
|
@ -102,7 +102,7 @@ import MyComponentSource from '!!raw-loader!@site/src/pages/examples/\_myCompone
|
|||
|
||||
```jsx live
|
||||
function Demo() {
|
||||
React.useEffect(() => console.log('mount'), []);
|
||||
useEffect(() => console.log('mount'), []);
|
||||
return null;
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue