Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fela example #7051

Merged
merged 4 commits into from
Apr 18, 2019
Merged

Update fela example #7051

merged 4 commits into from
Apr 18, 2019

Conversation

TxHawks
Copy link
Contributor

@TxHawks TxHawks commented Apr 16, 2019

This pull request updates the with-fela example to use the latest version of fela, and replaces usage of the old createComponent HOC API in the example with newer render-prop and hooks APIs

* Update dependencies in the Fela example to the latest version,
  which includes some breaking changes to existing APIs and exposes
  a new hooks-based API.
* Add the required `data-fela-id` attribute to the server-rendered style
  elements in `_document`
Replace usage of the `createComponent` HOC API, in favor of the more
idiomatic `FelaComponent` render-prop API and the `useFela` hooks API
which is designated to become the canonical implementation
@TxHawks TxHawks requested a review from lfades as a code owner April 16, 2019 18:42
@github-actions
Copy link
Contributor

Stats from current PR

Click to expand stats
zeit/next.js canary TxHawks/next.js update-fela-example Change
Build Duration 12.3s 11.4s -912ms
node_modules Size 43.9 MB 43.9 MB ⚠️ +12 B
Total Bundle (main, webpack, commons) Size 210 kB 210 kB
Total Bundle (main, webpack, commons) gzip Size 68.5 kB 68.5 kB
Client _app Size 2.49 kB 2.49 kB
Client _app gzip Size 1.04 kB 1.04 kB
Client _error Size 9.66 kB 9.66 kB
Client _error gzip Size 3.52 kB 3.52 kB
Client pages/index Size 298 B 298 B
Client pages/index gzip Size 235 B 235 B
Client pages/link Size 3.28 kB 3.28 kB
Client pages/link gzip Size 1.49 kB 1.49 kB
Client pages/routerDirect Size 426 B 426 B
Client pages/routerDirect gzip Size 304 B 304 B
Client pages/withRouter Size 408 B 408 B
Client pages/withRouter gzip Size 293 B 293 B
Client main Size 24.4 kB 24.4 kB
Client main gzip Size 7.89 kB 7.89 kB
Client commons Size 183 kB 183 kB
Client commons gzip Size 59.4 kB 59.4 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 774 B 774 B
Base Rendered Size 1.34 kB 1.34 kB
Build Dir Size 580 kB 580 kB
Click to expand serverless stats
zeit/next.js canary TxHawks/next.js update-fela-example Change
Build Duration 13.5s 13.4s -35ms
node_modules Size 43.9 MB 43.9 MB ⚠️ +12 B
Total Bundle (main, webpack, commons) Size 210 kB 210 kB
Total Bundle (main, webpack, commons) gzip Size 68.5 kB 68.5 kB
Client _app Size 2.49 kB 2.49 kB
Client _app gzip Size 1.04 kB 1.04 kB
Client _error Size 9.66 kB 9.66 kB
Client _error gzip Size 3.52 kB 3.52 kB
Client pages/index Size 298 B 298 B
Client pages/index gzip Size 235 B 235 B
Client pages/link Size 3.28 kB 3.28 kB
Client pages/link gzip Size 1.49 kB 1.49 kB
Client pages/routerDirect Size 426 B 426 B
Client pages/routerDirect gzip Size 304 B 304 B
Client pages/withRouter Size 408 B 408 B
Client pages/withRouter gzip Size 293 B 293 B
Client main Size 24.4 kB 24.4 kB
Client main gzip Size 7.89 kB 7.89 kB
Client commons Size 183 kB 183 kB
Client commons gzip Size 59.4 kB 59.4 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 774 B 774 B
Serverless pages/link Size 337 kB 337 kB
Serverless pages/link gzip Size 87.4 kB 87.4 kB
Serverless pages/index Size 330 kB 330 kB
Serverless pages/index gzip Size 85.4 kB 85.4 kB
Serverless pages/_error Size 331 kB 331 kB
Serverless pages/_error gzip Size 85.3 kB 85.3 kB
Serverless pages/routerDirect Size 330 kB 330 kB
Serverless pages/routerDirect gzip Size 85.5 kB 85.5 kB
Serverless pages/withRouter Size 330 kB 330 kB
Serverless pages/withRouter gzip Size 85.6 kB 85.6 kB ⚠️ +1 B
Build Dir Size 2.12 MB 2.12 MB

@github-actions
Copy link
Contributor

Stats from current PR

Click to expand stats
zeit/next.js canary TxHawks/next.js update-fela-example Change
Build Duration 11.8s 11.4s -417ms
node_modules Size 43.9 MB 43.9 MB ⚠️ +12 B
Total Bundle (main, webpack, commons) Size 210 kB 210 kB
Total Bundle (main, webpack, commons) gzip Size 68.5 kB 68.5 kB
Client _app Size 2.49 kB 2.49 kB
Client _app gzip Size 1.04 kB 1.04 kB
Client _error Size 9.66 kB 9.66 kB
Client _error gzip Size 3.52 kB 3.52 kB
Client pages/index Size 298 B 298 B
Client pages/index gzip Size 235 B 235 B
Client pages/link Size 3.28 kB 3.28 kB
Client pages/link gzip Size 1.49 kB 1.49 kB
Client pages/routerDirect Size 426 B 426 B
Client pages/routerDirect gzip Size 304 B 304 B
Client pages/withRouter Size 408 B 408 B
Client pages/withRouter gzip Size 293 B 293 B
Client main Size 24.4 kB 24.4 kB
Client main gzip Size 7.89 kB 7.89 kB
Client commons Size 183 kB 183 kB
Client commons gzip Size 59.4 kB 59.4 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 774 B 774 B
Base Rendered Size 1.34 kB 1.34 kB
Build Dir Size 580 kB 580 kB
Click to expand serverless stats
zeit/next.js canary TxHawks/next.js update-fela-example Change
Build Duration 13.2s 13.1s -106ms
node_modules Size 43.9 MB 43.9 MB ⚠️ +12 B
Total Bundle (main, webpack, commons) Size 210 kB 210 kB
Total Bundle (main, webpack, commons) gzip Size 68.5 kB 68.5 kB
Client _app Size 2.49 kB 2.49 kB
Client _app gzip Size 1.04 kB 1.04 kB
Client _error Size 9.66 kB 9.66 kB
Client _error gzip Size 3.52 kB 3.52 kB
Client pages/index Size 298 B 298 B
Client pages/index gzip Size 235 B 235 B
Client pages/link Size 3.28 kB 3.28 kB
Client pages/link gzip Size 1.49 kB 1.49 kB
Client pages/routerDirect Size 426 B 426 B
Client pages/routerDirect gzip Size 304 B 304 B
Client pages/withRouter Size 408 B 408 B
Client pages/withRouter gzip Size 293 B 293 B
Client main Size 24.4 kB 24.4 kB
Client main gzip Size 7.89 kB 7.89 kB
Client commons Size 183 kB 183 kB
Client commons gzip Size 59.4 kB 59.4 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 774 B 774 B
Serverless pages/link Size 338 kB 338 kB
Serverless pages/link gzip Size 87.4 kB 87.4 kB
Serverless pages/index Size 330 kB 330 kB
Serverless pages/index gzip Size 85.5 kB 85.5 kB -1 B
Serverless pages/_error Size 331 kB 331 kB
Serverless pages/_error gzip Size 85.3 kB 85.3 kB -1 B
Serverless pages/routerDirect Size 331 kB 331 kB
Serverless pages/routerDirect gzip Size 85.5 kB 85.5 kB -1 B
Serverless pages/withRouter Size 331 kB 331 kB
Serverless pages/withRouter gzip Size 85.6 kB 85.6 kB
Build Dir Size 2.12 MB 2.12 MB

@github-actions
Copy link
Contributor

Stats from current PR

Click to expand stats
zeit/next.js canary TxHawks/next.js update-fela-example Change
Build Duration 12.1s 11.8s -264ms
node_modules Size 43.9 MB 43.9 MB ⚠️ +12 B
Total Bundle (main, webpack, commons) Size 210 kB 210 kB
Total Bundle (main, webpack, commons) gzip Size 68.5 kB 68.5 kB
Client _app Size 2.49 kB 2.49 kB
Client _app gzip Size 1.04 kB 1.04 kB
Client _error Size 9.66 kB 9.66 kB
Client _error gzip Size 3.52 kB 3.52 kB
Client pages/index Size 298 B 298 B
Client pages/index gzip Size 235 B 235 B
Client pages/link Size 3.28 kB 3.28 kB
Client pages/link gzip Size 1.49 kB 1.49 kB
Client pages/routerDirect Size 426 B 426 B
Client pages/routerDirect gzip Size 304 B 304 B
Client pages/withRouter Size 408 B 408 B
Client pages/withRouter gzip Size 293 B 293 B
Client main Size 24.4 kB 24.4 kB
Client main gzip Size 7.89 kB 7.89 kB
Client commons Size 183 kB 183 kB
Client commons gzip Size 59.4 kB 59.4 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 774 B 774 B
Base Rendered Size 1.34 kB 1.34 kB
Build Dir Size 580 kB 580 kB
Click to expand serverless stats
zeit/next.js canary TxHawks/next.js update-fela-example Change
Build Duration 13.3s 12.9s -421ms
node_modules Size 43.9 MB 43.9 MB ⚠️ +12 B
Total Bundle (main, webpack, commons) Size 210 kB 210 kB
Total Bundle (main, webpack, commons) gzip Size 68.5 kB 68.5 kB
Client _app Size 2.49 kB 2.49 kB
Client _app gzip Size 1.04 kB 1.04 kB
Client _error Size 9.66 kB 9.66 kB
Client _error gzip Size 3.52 kB 3.52 kB
Client pages/index Size 298 B 298 B
Client pages/index gzip Size 235 B 235 B
Client pages/link Size 3.28 kB 3.28 kB
Client pages/link gzip Size 1.49 kB 1.49 kB
Client pages/routerDirect Size 426 B 426 B
Client pages/routerDirect gzip Size 304 B 304 B
Client pages/withRouter Size 408 B 408 B
Client pages/withRouter gzip Size 293 B 293 B
Client main Size 24.4 kB 24.4 kB
Client main gzip Size 7.89 kB 7.89 kB
Client commons Size 183 kB 183 kB
Client commons gzip Size 59.4 kB 59.4 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 774 B 774 B
Serverless pages/link Size 338 kB 338 kB
Serverless pages/link gzip Size 87.4 kB 87.4 kB ⚠️ +1 B
Serverless pages/index Size 330 kB 330 kB
Serverless pages/index gzip Size 85.5 kB 85.5 kB
Serverless pages/_error Size 331 kB 331 kB
Serverless pages/_error gzip Size 85.3 kB 85.3 kB ⚠️ +2 B
Serverless pages/routerDirect Size 331 kB 331 kB
Serverless pages/routerDirect gzip Size 85.5 kB 85.5 kB
Serverless pages/withRouter Size 331 kB 331 kB
Serverless pages/withRouter gzip Size 85.6 kB 85.6 kB ⚠️ +1 B
Build Dir Size 2.12 MB 2.12 MB

Copy link
Member

@lfades lfades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you @TxHawks 💯

@lfades lfades merged commit 90e4557 into vercel:canary Apr 18, 2019
@TxHawks TxHawks deleted the update-fela-example branch April 18, 2019 15:30
@lock lock bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants