Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const AppTodo = (props: Props) => {
const environment = useRelayEnvironment();
const [{user}, refetch] = useRefetch(fragmentSpec, props.query);
if (!user) {
return <div>;
}
const handleTextInputSave = (text: string) => {
AddTodoMutation.commit(environment, text, user);
return;
};
const hasTodos = user.totalCount > 0;
console.log('renderer');
return (
<header>
</header></div>
const TodoApp = props => {
const [user, refetch] = useRefetch(fragmentSpec, props.user);
const [mutate, {loading}] = useMutation(mutation);
const handleTextInputSave = (text: string) => {
AddTodoMutation.commit(mutate, text, user);
return;
};
const hasTodos = user.totalCount > 0;
return (
<div>
<section>
<header>
<h1>todos {props.userId}</h1>
</header></section></div>