Skip to content

Instantly share code, notes, and snippets.

View jbenesch's full-sized avatar

Jason Benesch jbenesch

View GitHub Profile
@doug-wade
doug-wade / reactive-conf-talk-proposal.md
Created August 13, 2016 19:35
reactive conf talk proposal

React is an amazing library for client-side user interface, and it has the added benefit of being able to be rendered on the server, which is crucial for SEO, SEM, and user experience. However, server-side rendering in practice is significantly more complicated than just calling ReactDOMServer.renderToString and piping out the result, especially if you want to make sure your site loads quickly in a mobile-first world. React Server smoothes out the common problems you run into with React server-side rendering, encodes performance best practices into the framework, and makes it easy to build high performance websites by default.

I'll discuss some of the design decisions we made during development, show our performance improvements, talk about lessons we've learned running React Server in production for a year and a half, and give some hints about the future of React Server, including adding streaming to React core.

@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent