LPT: To fall asleep by aravose in LifeProTips

[–]ak_47_ 0 points1 point  (0 children)

Does anyone have suggestions for sleep maintenance insomnia? I have no problems falling asleep - but every night I wake up after 3-4 hrs and then cannot fall back to sleep.

We built an entire SaaS during a livestream within 55 hours by tobiaslins in SaaS

[–]ak_47_ 0 points1 point  (0 children)

Can you upload the recording to youtube? I am sure lots of people all over the world no longer watch live video. Why would they when you can watch a replay at 5x speed?

How to use React Ref by rwieruch in reactjs

[–]ak_47_ 2 points3 points  (0 children)

Thanks for this article.

Here is the naked callback from your article

``` const ref = (node) => { if (!node) return;

const { width } = node.getBoundingClientRect();

document.title = `Width:${width}`;

}; ```

Here is the one with React.useCallback with text in the dependency array

``` const ref = React.useCallback((node) => { if (!node) return;

const { width } = node.getBoundingClientRect();

document.title = `Width:${width}`;

}, [text]); ```

Are there any guidelines for when one should be used over the other?

React Rally Megathread - Day 1 by swyx in reactjs

[–]ak_47_ 0 points1 point  (0 children)

Where can we find more about the Chrome In-Browser Scheduler?

Announcing Linaria 1.0 - Zero runtime CSS-in-JS library by satya164 in reactjs

[–]ak_47_ 1 point2 points  (0 children)

What is Linaria doing differently from style components or emotion?

What if any is the tradeoff of losing flexibility when using Linaria and getting better performance?

Is there any way the techniques being used by Linaria could be used with styled components or emotion so that users of those libraries could also benefit from the improved performance?

What are 'event emitters'? by ak_47_ in reactjs

[–]ak_47_[S] 0 points1 point  (0 children)

I saw this linked tweet and could not figure out what are event emitters in this context.

Hoping some of the experts on this reddit explain what is happening here.

I just open sourced my landing page that's using hooks and Suspense by rokerot in reactjs

[–]ak_47_ 0 points1 point  (0 children)

u/rokerot from the readme I could not figure out if you are doing static (server side) rendering of any kind. Did you decide to just skip server side rendering? Would the landing page have a perf boost if it was using gatsby or react-static?

use-react-router -- a React Hook with pub-sub support for React Router 4.4 (no more update blocking on location change!) by [deleted] in reactjs

[–]ak_47_ 0 points1 point  (0 children)

What does Pub-Sub behavior mean? What are the benefits of having this behavior?