r5n-dev / vscode-react-javascript-snippets

Extension for React/Javascript snippets with search supporting ES7+ and babel features

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snippets `rmc` and `rmcp` missing component name。

ganyanchuan1989 opened this issue · comments

version: v4.4.3
hot key: rmc
output:

import React, { memo } from 'react'

const Comp = memo(() => {
  return (
    <div>Comp</div>
  )
})

export default Comp

This way of declaring loses the name of the component in React Developer Tools。I wish as follows:

import React, { memo } from 'react'

const Comp = () => {
  return (
    <div>Comp</div>
  )
}

export default memo(Comp)

or

import React  from 'react'

const Comp = () => {
  return (
    <div>Comp</div>
  )
}

export default React.memo(Comp)

Hi,
I want to work on this.
Please assign me.

commented

Hi, I want to work on this. Please assign me.

What if he doesn't assign it to you and you submit mr yourself?