Skip to content

Snippets rmc and rmcp missing component name。 #289

Open
@ganyanchuan1989

Description

@ganyanchuan1989

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions