Monday, April 22, 2019

Shortcut in Visual Code for ReactJs

1. Type rfc and press TAB key, It will create a Rect Functional Component skeleton

Example:
import React from 'react'

export default function Launch() {
return (
<div>
</div>
)
}

If you type rcf: the Auto suggestion will point to rfc ;)
2. Type rcc and press TAB key, It will create a Rect Class Component skeleton

import React, { Component } from 'react'

export default class Launch extends Component {
render() {
return (
<div>
</div>
)
}
}


No comments: