Skip to content

Commit

Permalink
Update documentation with corrected usage of useTransistion
Browse files Browse the repository at this point in the history
Reviewed By: monicatang

Differential Revision: D49243423

fbshipit-source-id: b99e7e4b79cb5ee1e58478798ea9be3ce3a3d3e6
  • Loading branch information
alunyov authored and facebook-github-bot committed Sep 14, 2023
1 parent 5460894 commit 0d63f5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ const {

function TabSwitcher() {
// We use startTransition to schedule the update
const [startTransition] = useTransition();
const [_, startTransition] = useTransition();
const [selectedTab, setSelectedTab] = useState('Home');

return (
Expand Down Expand Up @@ -1846,7 +1846,7 @@ const {useState, useTransition} = require('React');
const {graphql, useLazyLoadQuery} = require('react-relay/hooks');

function App() {
const [startTransition] = useTransition();
const [_, startTransition] = useTransition();
const [variables, setVariables] = useState({id: '4'});

const data = useLazyLoadQuery<AppQuery>(
Expand Down Expand Up @@ -1894,7 +1894,7 @@ const {useState, useTransition} = require('React');
const {graphql, useLazyLoadQuery} = require('react-relay/hooks');

function App() {
const [startTransition] = useTransition();
const [_, startTransition] = useTransition();
const [state, setState] = useState({
fetchPolicy: 'store-or-network',
variables: {id: '4'},
Expand Down Expand Up @@ -1954,7 +1954,7 @@ type Props = {|
|};

function CommentBody(props: Props) {
const [startTransition] = useTransition();
const [_, startTransition] = useTransition();
const [data, refetch] = useRefetchableFragment<CommentBodyRefetchQuery, _>(
graphql`
fragment CommentBody_comment on Comment
Expand Down Expand Up @@ -2113,7 +2113,7 @@ type Props = {|
|};

function FriendsListComponent(props: Props) {
const [startTransition] = useTransition();
const [_, startTransition] = useTransition();
const {data, loadNext} = usePaginationFragment<FriendsListPaginationQuery, _>(
graphql`
fragment FriendsListComponent_user on User
Expand Down Expand Up @@ -2185,7 +2185,7 @@ type Props = {|
|};

function FriendsListComponent(props: Props) {
const [startTransition] = useTransition();
const [_, startTransition] = useTransition();
const {
data,
loadNext,
Expand Down Expand Up @@ -2476,7 +2476,7 @@ type Props = {|

function FriendsListComponent(props: Props) {
const searchTerm = props.searchTerm;
const [startTransition] = useTransition();
const [_, startTransition] = useTransition();
const {data, loadNext, refetch} = usePaginationFragment(
graphql`
fragment FriendsListComponent_user on User {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ type Props = {|
|};

function CommentBody(props: Props) {
const [startTransition] = useTransition();
const [_, startTransition] = useTransition();
const [data, refetch] = useRefetchableFragment<CommentBodyRefetchQuery, _>(
graphql`
fragment CommentBody_comment on Comment
Expand Down

0 comments on commit 0d63f5a

Please sign in to comment.