Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #5435
Closed
Open
Issue created Oct 14, 2018 by Administrator@rootContributor

Compile JSX to direct createElement() calls

Created by: gaearon

Due to how webpack works today with CommonJS, we pay the cost of three object property accesses (ReactWebpackBinding.default.createElement) for every JSX call. It doesn't minify well and has a minor effect on runtime performance. It's also a bit clowny.

We should fix this to compile JSX to something like

var createElement = require('react').createElement

createElement(...)

Could be a custom Babel transform. Could be a transform that inserts _createReactElement into scope and specifies it as the JSX pragma.

Assignee
Assign to
Time tracking