profile
viewpoint
Anderson de Oliveira andersonba @Jusbrasil Lisbon, Portugal andersonba.com Engineering Manager at Jusbrasil

andersonba/yve-bot 175

Smart rule-based bot. For Browser & Node.

nars-dev/nars 84

Server rendered React Native

andersonba/github-review-filter 42

Chrome extension to filter files in GitHub code review using glob

andersonba/puppeteer-assets 23

Measuring and monitor assets metrics using Puppeteer and Prometheus

andersonba/whoami.js 15

A simple and lightweight browser detection and logger library

andersonba/stepbar 6

Clean step bar that shows you where you are in the order progress

andersonba/questionr 1

A framework to make it easy for developers to add questionnaire to their pages.

andersonba/awesome-bots 0

Do you want our new bot tips & tactics every week via Messenger? Go here:

andersonba/awesome-browser-extensions-for-github 0

A collection of awesome browser extensions for GitHub.

andersonba/baseweb 0

A React Component library implementing the Base design language

issue commentyashmahalwal/relay-ssr

Question about rendering on server-side

I got it, makes sense. Thanks for the explanation! again, nice job!

andersonba

comment created time in a month

issue commentyashmahalwal/relay-ssr

Question about rendering on server-side

Another weird behavior it's if I use the store-and-network fetch policy:

  const result = useQuery<pagesQuery>(query, {}, {
    fetchPolicy: 'store-and-network',
  });

It will request the graphql 3 times:

  1. With the empty store on server (ok)
  2. Second render on server, ignoring the records data (makes sense due to rerender)
  3. At the browser (ok)

But I suppose it should be just 1 and 3.

andersonba

comment created time in a month

issue openedyashmahalwal/relay-ssr

Question about rendering on server-side

Hi Yash! First of all, nice job! I read your article on Medium and that's what got me to play with your code. I have a special question about rendering on the server-side.

Debugging your code, I added some console.log:

  1. console.log ('-- init --') on the first line of MyDocument.getInitialProps
  2. console.log ('App') before the return of component
  3. console.log ('Home') before the return of component

Screen Shot 2020-08-17 at 00 29 43

So, when I open the page, I notice that the components are rendering 2 times on the server. Thinking about performance, I believe that this can affect response time and using more server resources. Do you agree?

Looking at the code, I imagine that this happens because you call Document.getInitialProps(ctx) twice, due to overwriting the renderPage.

Was that expected? Wouldn't it be possible to solve with just one execution? Thanks!

created time in a month

issue commentsmartHomeHub/SmartIR

Climate preset_modes support

ping

Cookies1488

comment created time in 3 months

more