Skip to content

Instantly share code, notes, and snippets.

@gaearon
gaearon / prepack-gentle-intro-1.md
Last active March 22, 2025 07:22
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@catalin-enache
catalin-enache / es6_class_decoration.js
Created January 11, 2016 11:15
ES6 class decoration - aka Higher-Order Components
import React from 'react';
class MyComponent extends React.Component {
componentDidMount() {
console.log('MyComponent did mount - do specific stuff');
}
render() {
return (<div>MyComponent</div>);
}