Coder Social home page Coder Social logo

Comments (6)

viebel avatar viebel commented on April 20, 2024

Hello guys,
Please share your thoughts and concerns about this idea.

As a starter, here is the main value points and the concerns as I see it:

Value to the readers

they can experiment with the code snippets without having to leave the page.

Concerns

the size of the javascript files:

  • klipse plugin: 1.1 MB, 224KB zipped
  • babel: 1.4 MB, 459 KB zipped
  • codemirror: a few KBs

from reactjs.org.

bvaughn avatar bvaughn commented on April 20, 2024

Those file sizes are valid concerns certainly. I think we could potentially do some things to mitigate them. On the Babel REPL (source code here) we do a couple of things to help with this:

  • Load all big libs (eg Babel, big plug-ins) from CDN to benefit from browser cache.
  • Defer loading any plug-ins until needed.
  • Load them into a web-worker context so that compilation doesn't slow down the UI thread.

from reactjs.org.

viebel avatar viebel commented on April 20, 2024

Before reducing the footprint, would you like to give it a try on one or two pages of the react documentation and feel how it feels both on desktop and on mobile?

from reactjs.org.

bvaughn avatar bvaughn commented on April 20, 2024

I think it would be reasonable to put together a minimal proof-of-concept to see how the UX was before we worry too much about performance optimizations, sure.

from reactjs.org.

viebel avatar viebel commented on April 20, 2024

Hello guys,

I've been working on an integration of Klipse using [gatsby-plugin-klipse] (https://github.com/ahmedelgabri/gatsby-plugin-klipse) written by @ahmedelgabri. Here is the Work-In-Progress pull request #236
Let's continue the discussion there.

from reactjs.org.

bvaughn avatar bvaughn commented on April 20, 2024

I'm going to close this issue for now, for the reasons I mentioned in my comment on PR #236. I'm happy to keep talking about and re-evaluate any new ideas of proofs of concept though! ❤️

from reactjs.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.