GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Prettier · react/react@183f96f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • fixtures/devtools
    • regression
      • server.js
      • shared.js
    • shell
      • app
        • DeeplyNestedComponents
          • index.js
        • EditableProps
          • index.js
        • Hydration
          • index.js
        • Iframe
          • index.js
        • InspectableElements
          • Contexts.js
          • CustomHooks.js
          • InspectableElements.js
          • NestedProps.js
        • InteractionTracing
          • index.js
        • PriorityLevels
          • index.js
        • ReactNativeWeb
          • index.js
        • SuspenseTree
          • index.js
        • ToDoList
          • List.js
          • ListItem.js
        • Toggle
          • index.js
        • index.js
      • src
        • devtools.js
      • webpack.config.js
  • packages
    • react-devtools-core
      • src
        • backend.js
        • editor.js
        • standalone.js
      • webpack.backend.js
      • webpack.standalone.js
    • react-devtools-extensions
      • babel.config.js
      • chrome
        • build.js
        • test.js
      • firefox
        • build.js
        • test.js
      • flow-typed
        • chrome.js
        • jest.js
        • npm
          • react-test-renderer_v16.x.x.js
      • flow.js
      • shared
        • build.js
        • deploy.js
        • popups
          • shared.js
        • src
          • backend.js
          • background.js
          • injectGlobalHook.js
          • main.js
          • renderer.js
          • utils.js
        • webpack.backend.js
        • webpack.config.js
      • utils.js
    • react-devtools-inline
      • src
        • backend.js
        • frontend.js
      • webpack.config.js
    • react-devtools-shared/src
      • __tests__
        • bridge-test.js
        • console-test.js
        • inspectedElementContext-test.js
        • inspectedElementSerializer.js
        • legacy
          • inspectElement-test.js
          • storeLegacy-v15-test.js
        • ownersListContext-test.js
        • profilerContext-test.js
        • profilerStore-test.js
        • profilingCache-test.js
        • profilingCharts-test.js
        • profilingCommitTreeBuilder-test.js
        • profilingUtils-test.js
        • setupTests.js
        • store-test.js
        • storeComponentFilters-test.js
        • storeOwners-test.js
        • storeSerializer.js
        • storeStressSync-test.js
        • storeStressTestConcurrent-test.js
        • treeContext-test.js
        • utils.js
      • backend
        • NativeStyleEditor
          • resolveBoxStyle.js
          • setupNativeStyleEditor.js
        • agent.js
        • console.js
        • describeComponentFrame.js
        • index.js
        • legacy
          • renderer.js
          • utils.js
        • renderer.js
        • types.js
        • utils.js
        • views/Highlighter
          • Highlighter.js
          • Overlay.js
          • index.js
      • bridge.js
      • constants.js
      • devtools
        • ProfilerStore.js
        • ProfilingCache.js
        • cache.js
        • index.js
        • store.js
        • utils.js
        • views
          • ButtonIcon.js
          • Components
            • Badge.js
            • Components.js
            • EditableValue.js
            • Element.js
            • ExpandCollapseToggle.js
            • HocBadges.js
            • HooksTree.js
            • InspectHostNodesToggle.js
            • InspectedElementContext.js
            • InspectedElementTree.js
            • KeyValue.js
            • NativeStyleEditor
              • AutoSizeInput.js
              • LayoutViewer.js
              • StyleEditor.js
              • context.js
              • index.js
            • OwnersListContext.js
            • OwnersStack.js
            • SearchInput.js
            • SelectedElement.js
            • SelectedTreeHighlight.js
            • Tree.js
            • TreeContext.js
            • TreeFocusedContext.js
            • ViewElementSourceContext.js
            • types.js
          • DevTools.js
          • ErrorBoundary.js
          • Icon.js
          • ModalDialog.js
          • Profiler
            • ChartNode.js
            • ClearProfilingDataButton.js
            • CommitFlamegraph.js
            • CommitFlamegraphListItem.js
            • CommitRanked.js
            • CommitRankedListItem.js
            • CommitTreeBuilder.js
            • FlamegraphChartBuilder.js
            • InteractionListItem.js
            • Interactions.js
            • InteractionsChartBuilder.js
            • NoInteractions.js
            • Profiler.js
            • ProfilerContext.js
            • ProfilingImportExportButtons.js
            • RankedChartBuilder.js
            • RecordToggle.js
            • ReloadAndProfileButton.js
            • RootSelector.js
            • SidebarCommitInfo.js
            • SidebarInteractions.js
            • SidebarSelectedFiberInfo.js
            • SnapshotCommitList.js
            • SnapshotCommitListItem.js
            • SnapshotSelector.js
            • types.js
            • utils.js
          • ReactLogo.js
          • Settings
            • ComponentsSettings.js
            • GeneralSettings.js
            • ProfilerSettings.js
            • SettingsContext.js
            • SettingsModal.js
            • SettingsModalContext.js
            • SettingsModalContextToggle.js
          • ShowWelcomeToTheNewDevToolsDialog.js
          • TabBar.js
          • Toggle.js
          • WarnIfLegacyBackendDetected.js
          • context.js
          • hooks.js
          • portaledContent.js
          • utils.js
      • hook.js
      • hydration.js
      • utils.js
    • react-devtools
      • app.js
      • bin.js
      • index.js

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎fixtures/devtools/regression/server.js‎

Copy file name to clipboardExpand all lines: fixtures/devtools/regression/server.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const http = require('http');
55
const serveStatic = require('serve-static');
66

77
// Serve fixtures folder
8-
const serve = serveStatic(__dirname, { index: 'index.html' });
8+
const serve = serveStatic(__dirname, {index: 'index.html'});
99

1010
// Create server
1111
const server = http.createServer(function onRequest(req, res) {
Collapse file

‎fixtures/devtools/regression/shared.js‎

Copy file name to clipboardExpand all lines: fixtures/devtools/regression/shared.js
+13-15Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const minor =
1010
pieces[0] === '0' ? parseInt(pieces[2], 10) : parseInt(pieces[1], 10);
1111

1212
// Convenience wrapper to organize API features in DevTools.
13-
function Feature({ children, label, version }) {
13+
function Feature({children, label, version}) {
1414
return (
1515
<div className="Feature">
1616
<div className="FeatureHeader">
@@ -60,10 +60,10 @@ switch (major) {
6060
}
6161
case 6:
6262
// memo
63-
function LabelComponent({ label }) {
63+
function LabelComponent({label}) {
6464
return <label>{label}</label>;
6565
}
66-
const AnonymousMemoized = React.memo(({ label }) => (
66+
const AnonymousMemoized = React.memo(({label}) => (
6767
<label>{label}</label>
6868
));
6969
const Memoized = React.memo(LabelComponent);
@@ -91,8 +91,8 @@ switch (major) {
9191
getResourceKey
9292
);
9393
class Suspending extends React.Component {
94-
state = { useSuspense: false };
95-
useSuspense = () => this.setState({ useSuspense: true });
94+
state = {useSuspense: false};
95+
useSuspense = () => this.setState({useSuspense: true});
9696
render() {
9797
if (this.state.useSuspense) {
9898
const text = Resource.read(['loaded', 2000]);
@@ -141,9 +141,9 @@ switch (major) {
141141
case 4:
142142
// unstable_Profiler
143143
class ProfilerChild extends React.Component {
144-
state = { count: 0 };
144+
state = {count: 0};
145145
incrementCount = () =>
146-
this.setState(prevState => ({ count: prevState.count + 1 }));
146+
this.setState(prevState => ({count: prevState.count + 1}));
147147
render() {
148148
return (
149149
<div>
@@ -159,8 +159,7 @@ switch (major) {
159159
<Feature
160160
key="unstable_Profiler"
161161
label="unstable_Profiler"
162-
version="16.4+"
163-
>
162+
version="16.4+">
164163
<Profiler id="count" onRender={onRender}>
165164
<div>
166165
<ProfilerChild />
@@ -230,8 +229,7 @@ switch (major) {
230229
<Feature
231230
key="AsyncMode/ConcurrentMode"
232231
label="AsyncMode/ConcurrentMode"
233-
version="16.3+"
234-
>
232+
version="16.3+">
235233
<ConcurrentMode>
236234
<div>
237235
unstable_AsyncMode was added in 16.3, renamed to
@@ -271,13 +269,13 @@ function Even() {
271269

272270
// Simple stateful app shared by all React versions
273271
class SimpleApp extends React.Component {
274-
state = { count: 0 };
272+
state = {count: 0};
275273
incrementCount = () => {
276-
const updaterFn = prevState => ({ count: prevState.count + 1 });
274+
const updaterFn = prevState => ({count: prevState.count + 1});
277275
trace('Updating count', performance.now(), () => this.setState(updaterFn));
278276
};
279277
render() {
280-
const { count } = this.state;
278+
const {count} = this.state;
281279
return (
282280
<div>
283281
{count % 2 === 0 ? (
@@ -299,7 +297,7 @@ apps.push(
299297
);
300298

301299
// This component, with the version prop, helps organize DevTools at a glance.
302-
function TopLevelWrapperForDevTools({ version }) {
300+
function TopLevelWrapperForDevTools({version}) {
303301
let header = <h1>React {version}</h1>;
304302
if (version.includes('canary')) {
305303
const commitSha = version.match(/.+canary-(.+)/)[1];
Collapse file

‎fixtures/devtools/shell/app/DeeplyNestedComponents/index.js‎

Copy file name to clipboardExpand all lines: fixtures/devtools/shell/app/DeeplyNestedComponents/index.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22

3-
import React, { Fragment } from 'react';
3+
import React, {Fragment} from 'react';
44

55
function wrapWithHoc(Component, index) {
66
function HOC() {
Collapse file

‎fixtures/devtools/shell/app/EditableProps/index.js‎

Copy file name to clipboardExpand all lines: fixtures/devtools/shell/app/EditableProps/index.js
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ import React, {
1313
useState,
1414
} from 'react';
1515

16-
const initialData = { foo: 'FOO', bar: 'BAR' };
16+
const initialData = {foo: 'FOO', bar: 'BAR'};
1717

1818
function reducer(state, action) {
1919
switch (action.type) {
2020
case 'swap':
21-
return { foo: state.bar, bar: state.foo };
21+
return {foo: state.bar, bar: state.foo};
2222
default:
2323
throw new Error();
2424
}
2525
}
2626

27-
type StatefulFunctionProps = {| name: string |};
27+
type StatefulFunctionProps = {|name: string|};
2828

29-
function StatefulFunction({ name }: StatefulFunctionProps) {
29+
function StatefulFunction({name}: StatefulFunctionProps) {
3030
const [count, updateCount] = useState(0);
3131
const debouncedCount = useDebounce(count, 1000);
3232
const handleUpdateCountClick = useCallback(() => updateCount(count + 1), [
@@ -35,7 +35,7 @@ function StatefulFunction({ name }: StatefulFunctionProps) {
3535

3636
const [data, dispatch] = useReducer(reducer, initialData);
3737
const handleUpdateReducerClick = useCallback(
38-
() => dispatch({ type: 'swap' }),
38+
() => dispatch({type: 'swap'}),
3939
[]
4040
);
4141

@@ -60,8 +60,8 @@ function StatefulFunction({ name }: StatefulFunctionProps) {
6060
const BoolContext = createContext(true);
6161
BoolContext.displayName = 'BoolContext';
6262

63-
type Props = {| name: string, toggle: boolean |};
64-
type State = {| cities: Array<string>, state: string |};
63+
type Props = {|name: string, toggle: boolean|};
64+
type State = {|cities: Array<string>, state: string|};
6565

6666
class StatefulClass extends Component<Props, State> {
6767
static contextType = BoolContext;
@@ -71,7 +71,7 @@ class StatefulClass extends Component<Props, State> {
7171
state: 'California',
7272
};
7373

74-
handleChange = ({ target }) =>
74+
handleChange = ({target}) =>
7575
this.setState({
7676
state: target.value,
7777
});
@@ -94,8 +94,8 @@ class StatefulClass extends Component<Props, State> {
9494
const MemoizedStatefulClass = memo(StatefulClass);
9595
const MemoizedStatefulFunction = memo(StatefulFunction);
9696

97-
const ForwardRef = forwardRef<{| name: string |}, HTMLUListElement>(
98-
({ name }, ref) => {
97+
const ForwardRef = forwardRef<{|name: string|}, HTMLUListElement>(
98+
({name}, ref) => {
9999
const [count, updateCount] = useState(0);
100100
const debouncedCount = useDebounce(count, 1000);
101101
const handleUpdateCountClick = useCallback(() => updateCount(count + 1), [
Collapse file

‎fixtures/devtools/shell/app/Hydration/index.js‎

Copy file name to clipboardExpand all lines: fixtures/devtools/shell/app/Hydration/index.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22

3-
import React, { Fragment, useDebugValue, useState } from 'react';
3+
import React, {Fragment, useDebugValue, useState} from 'react';
44

55
const div = document.createElement('div');
66
const exmapleFunction = () => {};
@@ -110,7 +110,7 @@ export default function Hydration() {
110110
);
111111
}
112112

113-
function DehydratableProps({ array, object }: any) {
113+
function DehydratableProps({array, object}: any) {
114114
return (
115115
<ul>
116116
<li>array: {JSON.stringify(array, null, 2)}</li>
Collapse file

‎fixtures/devtools/shell/app/Iframe/index.js‎

Copy file name to clipboardExpand all lines: fixtures/devtools/shell/app/Iframe/index.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @flow */
22

3-
import React, { Fragment } from 'react';
3+
import React, {Fragment} from 'react';
44
import ReactDOM from 'react-dom';
55

66
export default function Iframe() {
@@ -16,7 +16,7 @@ export default function Iframe() {
1616
);
1717
}
1818

19-
const iframeStyle = { border: '2px solid #eee', height: 80 };
19+
const iframeStyle = {border: '2px solid #eee', height: 80};
2020

2121
function Frame(props) {
2222
const [element, setElement] = React.useState(null);
Collapse file

‎fixtures/devtools/shell/app/InspectableElements/Contexts.js‎

Copy file name to clipboardExpand all lines: fixtures/devtools/shell/app/InspectableElements/Contexts.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22

3-
import React, { createContext, Component, Fragment, useContext } from 'react';
3+
import React, {createContext, Component, Fragment, useContext} from 'react';
44
import PropTypes from 'prop-types';
55

66
function someNamedFunction() {}
@@ -10,7 +10,7 @@ const contextData = {
1010
bool: true,
1111
func: someNamedFunction,
1212
number: 123,
13-
object: { outer: { inner: {} } },
13+
object: {outer: {inner: {}}},
1414
string: 'abc',
1515
symbol: Symbol.for('symbol'),
1616
null: null,
Collapse file

‎fixtures/devtools/shell/app/InspectableElements/CustomHooks.js‎

Copy file name to clipboardExpand all lines: fixtures/devtools/shell/app/InspectableElements/CustomHooks.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const object = {
1717
null: null,
1818
undefined: undefined,
1919
array: ['a', 'b', 'c'],
20-
object: { foo: 1, bar: 2, baz: 3 },
20+
object: {foo: 1, bar: 2, baz: 3},
2121
};
2222

2323
function useNestedInnerHook() {
Collapse file

‎fixtures/devtools/shell/app/InspectableElements/InspectableElements.js‎

Copy file name to clipboardExpand all lines: fixtures/devtools/shell/app/InspectableElements/InspectableElements.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22

3-
import React, { Fragment } from 'react';
3+
import React, {Fragment} from 'react';
44
import Contexts from './Contexts';
55
import CustomHooks from './CustomHooks';
66
import CustomObject from './CustomObject';
Collapse file

‎fixtures/devtools/shell/app/InspectableElements/NestedProps.js‎

Copy file name to clipboardExpand all lines: fixtures/devtools/shell/app/InspectableElements/NestedProps.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function ObjectProps() {
2222
}}
2323
array={['first', 'second', 'third']}
2424
objectInArray={[object]}
25-
arrayInObject={{ array: ['first', 'second', 'third'] }}
25+
arrayInObject={{array: ['first', 'second', 'third']}}
2626
deepObject={{
2727
// Known limitation: we won't go deeper than several levels.
2828
// In the future, we might offer a way to request deeper access on demand.

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.