r5n-labs / vscode-react-javascript-snippets

Extension for React/Javascript snippets with search supporting ES7+ and babel features
MIT License
1.74k stars 442 forks source link

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

Open ganyanchuan1989 opened 1 year ago

ganyanchuan1989 commented 1 year ago

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)
theavitw commented 1 year ago

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

LukerSpringtree commented 1 year ago

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

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