Advanced React - Wes Bos Flashcards

1
Q

What is the purpose of Next.js?

A

It lets us do server-side rendering of our app and provides a way to do pages, routing, and overall layout of the app.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do you need to do to set up Next.js?

A

You don’t have to write any custom routing, it just figures it out, but you do have to do a little config.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Apollo used for?

A

To manage interacting with our data on the client.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does Apollo replace, effectively?

A

Both React State and Redux.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Besides managing our state, what does Apollo do?

A

It helps us perform GraphQL mutations, fetch data, and is has lightning fast caching built in to it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does it mean to say Apollo has caching built-in?

A

The data is stored in the cache, so it becomes instant to go back and forth between pages after the first time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Can Apollo manage local state?

A

Yep.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which states does Apollo provide?

A

Both error and loading states - it takes care of catching errors and nicely providing them to us.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Prisma?

A

It provides an interface layer on top of your database for all CRUD operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

With Prisma, do you interface directly with the MySQL database?

A

No - it’s a layer on top of the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does Prisma work?

A

Almost all GraphQL APIs are the same for CRUD operations, so Prisma provides a comprehensive API so that we can provide what our data looks like, then it ingests that, and provides us an API we can use on top of the data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How is Prisma hosted?

A

It can either be self-hosted or used as a service.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Does Prisma provide a logic layer (to do stuff when saving, or updating, deleting, or viewing)?

A

No - if you want to introduce logic before or after data operations, you’ll need something else (like GraphQL Yoga)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is GraphQL Yoga used for?

A

It’s used for additional logic - say, sending an email after a record is created, or resizing an image before saving it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly