Complete the code to import the Astro component correctly.
import [1] from 'astro/components';
The correct import for Astro components is Component.
Complete the code to create a Next.js page component.
export default function [1]() { return <div>Hello Next.js</div>; }
Next.js page components are often named Page by convention.
Fix the error in the Gatsby GraphQL query syntax.
export const query = graphql`query [1] { allMarkdownRemark { nodes { id } } }`;The query name must be a valid identifier, like MyQuery.
Fill both blanks to create a React component in Next.js that uses useState and useEffect.
import React, { [1] , [2] } from 'react'; function Counter() { const [count, setCount] = [3](0); [4](() => { document.title = `Count: ${count}`; }, [count]); return <button onClick={() => setCount(count + 1)}>{count}</button>; }
To manage state and side effects in React, use useState and useEffect.
Fill all three blanks to create a Gatsby page component that queries data and displays it.
import React from 'react'; import { graphql } from 'gatsby'; export default function BlogPost({ data }) { return <div><h1>{data.[1].title}</h1><p>{data.[2].content}</p></div>; } export const query = graphql`query [3] { markdownRemark { title content } }`;
The data object keys match the GraphQL query name markdownRemark, and the query is named BlogPostQuery.
