docz
docz copied to clipboard
Props not rendering when using the es11 optional chaining feature
Bug Report
When I use the object?.key
inside my component code, the Props table doesn't render. And when I change to object.key
the Props component render successfully my prop-types.
I tried add the corresponding babel plugin on my gatsby-node.js, but this not work.
exports.onCreateBabelConfig = ({ actions }) => {
actions.setBabelPlugin({
name: '@babel/plugin-proposal-optional-chaining'
})
}
To Reproduce
Use the optional chaining feature from es11 inside your React component.
Expected behavior
That and other es11 was enable by default with Creact React App. The Props component need render the prop-types of components that use the es11 features supported by CRA.
Environment
- docz version: [2.3.1]
- OS: [OSX 10.15.4]
- Node/npm version: [Node 12/npm 6]
Same bug here. With optional chaining, the <Props /> render disappeared.
It was a problem with current version react-docgen. It's failing to parse the optional chain operator due to a babel change, and they fixed it in prior versions.
🙏 Please upgrade, because optional chaining is everywhere in my projects. It make alot of expressions cleaner 👍
Same bug here. Will you be fixing this ?
This probably will be fixed in the newest version :)
@pedronauck thanks for the response. Is the new version available for testing ? If not, do you have a release date in mind ?
Hi @NightFox7, I'm confident I will release it in the next couple of months (final November is the deadline). I'm almost done with the main features, just working to improve the basic template and create automated tests for the project.
Some cool new feature that it will include is the ability to support more than one framework together :)