Skip to content

Commit

Permalink
Fixed stack trace errors. Added additional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Jun 26, 2021
1 parent 39f8b85 commit 3599ead
Show file tree
Hide file tree
Showing 23 changed files with 549 additions and 65 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

import React from 'react';
import useTheme from './useTheme';

export function Component() {
const theme = useTheme();

return <div>theme: {theme}</div>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import React, {useState} from 'react';

function Example() {
export function Component() {
const [count, setCount] = useState(0);

return (
Expand All @@ -19,5 +19,3 @@ function Example() {
</div>
);
}

export default Example;
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export function Component() {
const [count] = require('react').useState(0);

return count;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import * as React from 'react';
import {Fragment, useCallback, useState} from 'react';

function ListItem({item, removeItem, toggleItem}) {
export function ListItem({item, removeItem, toggleItem}) {
const handleDelete = useCallback(() => {
removeItem(item);
}, [item, removeItem]);
Expand All @@ -34,7 +34,7 @@ function ListItem({item, removeItem, toggleItem}) {
);
}

export default function List(props) {
export function List(props) {
const [newItemText, setNewItemText] = useState('');
const [items, setItems] = useState([
{id: 1, isComplete: true, text: 'First'},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3599ead

Please sign in to comment.