Skip to content

Advanced react course

Marie-Louise edited this page Feb 21, 2019 · 4 revisions

Global Styles

injectGlobal ' html { box-sizing:border-box; } *, *:before, *after { box-sizing:inherit; }

Theme provider

color:${theme.black}

Style components

import NavStyles from './styles.....'

style components by default don't work on the server. You need more to make it render on the client side as well as on the server side.

on the client side whenever you mount any component, they all have their own components....but we need the css at the point of doing the render server style sheet - which

collect styles and compile them all and dump them into the page

need to restart npm run dev after adjusting these settings

Pre fetch

import the router from next import NavStyles from './next/router.....'

then listen to the events which are routing

GraphQL

backend

what is graphQL? specification built to implement a server to fetch... it's agnostic to a .. is a spec its a single end point that you hit, not like a rest API It will return only the data that you have requested is a type language it's not loosely typed unlike javascript you query or modify/mutate the data

we're using a Prisma server

WHAT ARE????

JWT COOKIES

how do tokens get set in the cookie?

current user query? - this can be imported refetch queries? what is ctx ??? ()ctx.response.clearcookie context? mutations in the db??? what are tokens in this context ?? token expiry?? somehow linked to resetting password reset token as well as token expiry

what is randombytes??? what is promise -ify???

THE SIGN UP IS DONE USING GQL

Clone this wiki locally