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 = () => {
const isRehydrated = useRestore(environment);
if (!isRehydrated) {
console.log("loading");
return ;
}
console.log("renderer");
return (
{
const AppTodo = props => {
const isRehydrated = useRestore(environment);
if (!isRehydrated) {
console.log('loading');
return <div>;
}
console.log('renderer');
// ***** added to verify useRestore and fetchQuery ***
/*const [load, setLoad] = React.useState(false);
React.useEffect(() => {
Array.from({length: 10},(_,x) =>
fetchQuery(environment, graphql`
query appQuery($userId: String) {
user(id: $userId) {
...TodoApp_user
}
}</div>