1

I am using this extension to generate code snippets when working with react.

In documentation it says when used fc abbreviation it should work as below.

fc - Function Component
const | = props => {
  return ( | );
};

export default |;

But, fc is not there only ffc is there which gives below snippet.

function | () {
  return ( | );
}

export default |;

2 Answers 2

4

As far as I know this is the most common one and propobaly what most of vsc devs use: https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets

Try this one with the rafce snippet....

Sign up to request clarification or add additional context in comments.

3 Comments

It is still generating named function component not with const.
You misspelled I guess, it is rafce.
try "rafce" i think this is the one, @confusedWarrior is right
0

ffc is for the functional component but sfc is for a stateless arrow function component. sfc will work in your case

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.