Channel
Interviewed Person
Tim Neutkens
- Tim, in the last two videos, we talked-- we introduced a bit how Next.js is as a good, a viable solution for building, websites and apps. And also we talked about the AMP rendering, - Right. - For having like more optimized rendering for search engines, and also for your websites for better experience
and more speed. And now, I would like to focus more on using Next with other things, other frameworks, - Right. - other things. Maybe like GraphQL, or you know, some people like - Right! - styled-components, can you tell us more about the things that people use Next with? - Right, so, we've seen many cases where people want to use like, one library or the other or like multiple different things. They might want to use Apollo for doing data fetching
using GraphQL, or they want to use Redux, styled-components for styling, specifically for styling we also include a library by default which is called styled-jsx. Which is another way to do styling in CSS, CSS in JS basically, and we have an examples directory, which has I think over 190 examples right now.
Which is, yeah, it's a crazy amount, but we all maintain them still - most is contributed by the community. - Yeah, most are contributed by the community, they are maintained by the community in many cases. For example, the Apollo example, when we accepted the Apollo example, I hadn't used Apollo before, so someone from the community actually, like went in there, like, created the example, we could review it, because it's code, of course, we can still review the code,
and see like, if the implementation is good and then like just merge them. - Right, so for instance, if I need to use GraphQL, then I would go to that sample of using Apollo and that would kind of inspire from it-- - Yes. - In a way. - Yeah, so you would end up like, copying the implementation and then you're also aware of like what it does exactly instead of like, having it in an abstracted way for example. - Right, okay. So, but you didn't--, you did--
in this matter, you don't take an opinion about that, if people want to use REST, - Yes. - You'll let them use REST, if they want to use Apollo, - Yup. - And GraphQL, that's their choice. - Yes, the only thing that we provide for data fetching is getInitialProps. And getInitialProps is just an asynchronous method so you can do like, anything that you want in there, basically, as long as it can be executed on the server and on the client site. Which means that it runs on your-- on the browsers of users basically also,
when you navigate between pages so, you can use like Apollo but you can also do just like fetch official, fetch standard and get some data from somewhere. - Right, and when people start with Next, what are the things that they kind of struggle the most with or what do they like spend their time in the beginning trying to understand? Are there like, this kind of things that you--
what kind of advise you can give them when they're starting with a Next app. - Really good question. (laughs) So, generally, what we do is we have an-- we actually have a website, on nextjs.org like the main website, there's a button called "Learn", and we have this amazing Learn section where you can do, like a guided tour through like everything that Next does, like all the features, it has like quizzes to revalidate like your knowledge, and you get like points,