Skip to content

Migrate examples to CodeSandbox #122

Closed
@bvaughn

Description

@bvaughn

The docs site currently links to Codepen.io in several places, eg "Try it on CodePen". This is a maintenance burden for a few reasons:

  • These pens are versioned separately from the website and so they can get stale.
  • Updating them is a hassle. (Currently updates have to be done by @gaearon since he created the pens.)
  • OSS users can't contribute fixes without forking the pens, which would make them harder still to update in the future.

CodeSandbox has a feature to import pens directly from GitHub. This sounds great! If our pens lived in GitHub then it would be much easier to keep them synchronized with docs changes. (Also CodeSandbox is slick ❤️ !)

Open questions

Ideally we could group all of the current pens together into a single folder (eg sandbox) and then deep-link to individual example files. However after a brief look at the CodeSandbox feature, I believe it treats an entire git repository as a single project.

Considerations

It's possible that the levels of traffic the React website sees would cause scaling problems for CodeSandbox. We might want to try this integration in some limited form at first, with reduced traffic.

cc @CompuIves in case you're interested in collaborating on this

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions