Giter Site home page Giter Site logo

Comments (6)

denisborovikov avatar denisborovikov commented on April 28, 2024 2

Have you seen react-powerplug?

from docz.

pedronauck avatar pedronauck commented on April 28, 2024 1

Hi @danburzo. Isn't our plans create something like that exactly because react-powerplug is awesome and can fit so good with docz. Built-in components need to be something that have some dependency from docz data or environment!

from docz.

jedrichards avatar jedrichards commented on April 28, 2024 1

Wouldn't an api like the below make Playground much more useful out of the box?

<Playground state={{value: ''}}>
  {
    ({state, setState}) => (
      <input
        value={state.value},
        onChange={e => setState({ value: e.target.value })}
      />
    )
  }
</Playground>

It would be completely optional and opt-in (i.e. using a render prop as opposed to children). Should be super easy to implement with react-powerplug under the hood.

from docz.

danburzo avatar danburzo commented on April 28, 2024

@denisborovikov no, I haven't, that's exactly what I was looking for, thank you very much! :)
I'll leave this open for now, in case a built-in component is still on the table, but I'm very happy with this resolution ✌️

from docz.

danburzo avatar danburzo commented on April 28, 2024

Makes sense, thank you!

from docz.

pedronauck avatar pedronauck commented on April 28, 2024

I think that is not a good idea @jedrichards, this will put extra concerns for Playground. In the future, we'll put knobs on it, and this can bloat the component a lot.

from docz.

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.