Coder Social home page Coder Social logo

Comments (7)

banderson avatar banderson commented on April 28, 2024

@fkling Is this something that's already underway? I can lend a hand if needed, this would be huge for me.

from react-docgen.

fkling avatar fkling commented on April 28, 2024

I haven't started yet. If you want to take a stab on it, I'd appreciate it!

from react-docgen.

banderson avatar banderson commented on April 28, 2024

Ok, great, I'll see what I can do.

For those who need this ASAP and want a clue of where to start, I spiked out the minimal functionality I needed here. This just covers allowing ES6 style imports and default exports. Hopefully I can eventually flesh out the remaining details and get it merged in here.

from react-docgen.

fkling avatar fkling commented on April 28, 2024

@banderson: Did you make any progress with this? What's the status?

from react-docgen.

banderson avatar banderson commented on April 28, 2024

@fkling I got React.createClass recognition for ES6 default exports and ID'ing React in ES6 import statements in just that small change linked above. This works well for my use cases. Now I'm working on PropTypes recognition for using named imports (e.g. import React, {PropTypes} from 'React';) and in restructured assignment (let {PropTypes} = React;).

Before this is done, we'd need to ensure all import export cases are covered, and tests for all the existing cases :/ Glad to help out as much as I can, would welcome help from anyone else that knows more use cases if they exist :)

from react-docgen.

fkling avatar fkling commented on April 28, 2024

Great, thanks! Feel free to make a PR for the things that are working. The destructuring assignment case should already be covered with 2539959.

from react-docgen.

fkling avatar fkling commented on April 28, 2024

This should work as of 623c192, release with v1.3.0

from react-docgen.

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.