I don't know if this belongs here or not, so feel free to redirect me elsewhere.
I've found that when this plugin is used together with vim-jsx it breaks at inline JSX props containing arrow functions like onClick={() => this.setState({ isShowing: !state.isShowing })}.
Here's the broken screenshot:
I tracked it down to the type hint definition for javascriptArrowFuncDef. Without it, it renders fine:
I have no idea how to fix it though, would you know how to go about it?
Thanks!
Here's the code in case it comes in handy to test it:
import Gif from './Gif.js'
import React from 'react'
class App extends React.Component {
state = {
isShowing: true,
}
render() {
const { props, state } = this
return (
<div>
<button onClick={() => ''}>
{state.isShowing ? 'hide' : 'show'}
</button>
{state.isShowing && (
<div>
{props.list.map(image => <Gif key={image.id} {...image} />)}
</div>
)}
</div>
)
}
}
export default App
Hi,
I don't know if this belongs here or not, so feel free to redirect me elsewhere.
I've found that when this plugin is used together with
vim-jsx
it breaks at inline JSX props containing arrow functions likeonClick={() => this.setState({ isShowing: !state.isShowing })}
.Here's the broken screenshot:
I tracked it down to the type hint definition for javascriptArrowFuncDef. Without it, it renders fine:
I have no idea how to fix it though, would you know how to go about it? Thanks!
Here's the code in case it comes in handy to test it: