Nextjs study

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

How do you serve static files

Create a folder called static in your project root directory. From your code you can then reference those files with /static/ URLs: export default () => <img src="/static/my-image.png" alt="my image" />

How do you append elements to the header?

We expose a built-in component for appending elements to the <head> of the page.

How do you move from page to page without using <link>?

You can also do client-side page transitions using the next/router import Router from 'next/router' export default () => ( <div> Click <span onClick={() => Router.push('/about')}>here</span> to read more </div> )

Show an example of adding elements with the built in header

export default () => ( <div> <Head> <title>My page title</title> <meta name="viewport" content="initial-scale=1.0, width=device-width" /> </Head> <p>Hello world!</p> </div> )


Set pelajaran terkait

cardiovascular and respiratory medications

View Set

Prototype: Psyllium (bulk forming laxative)

View Set

Environmental Health and Safety Quiz #1

View Set

Worksheet 1D Word Building Practice

View Set

Practice Test Chapter 13 MasteringBiology

View Set