All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
Option |
Description |
importReactOnTop |
Controls if snippets should add import React from 'react'; at the top of components.\nSet false if you have React +17 and use jsx transform. |
semicolon |
Controls if snippets should add semicolon at the end of the line. |
typing |
Controls if React components have typescript Props typing. |
Trigger |
Content |
rncc |
react native class component skeleton |
rnfc |
react native function component skeleton |
Trigger |
Content |
com |
Comment Block |
- Convert filenames to pascal case for component names (#5)
- remove support for ts
- Convert filenames to pascal case for component names (#5) (f7b69ea)
- remove support for ts (d14912a)
Trigger |
Content |
rncc |
react native class component skeleton |
rnfc |
react native function component skeleton |
Trigger |
Content |
ipt |
import PropTypes from 'prop-types'; |
Trigger |
Content |
clg |
console.log() |
rcc |
class component skeleton |
rccp |
class component skeleton with prop types after the class |
rfc |
function component skeleton |
rfcp |
function component with prop types skeleton |
test |
test Block |
it |
it Block |
Trigger |
Content |
com |
Comment Block |
Trigger |
Content |
pto |
PropTypes.object., |
ptor |
PropTypes.object.isRequired, |
Trigger |
Content |
imr |
import React from 'react'; |
Trigger |
Content |
imr |
import React from 'react'; |
imrc |
import React, { Component } from 'react'; |
imrs |
import React, { useState } from 'react'; |
imre |
import React, { useEffect } from 'react'; |
ipt |
import PropTypes from 'prop-types'; |
conc |
class default constructor with props and context |
pto |
PropTypes.object., |
ptor |
PropTypes.object.isRequired, |
Trigger |
Content |
redux |
import { connect } from 'react-redux'; |
imn |
import 'module'; |
exp |
export default moduleName; |
rqr |
require('package'); |
mde |
module.exports = { }; |
imrpc |
import React, { PureComponent } from 'react'; |
rpc |
class pure component skeleton with prop types after the class |
rpt |
empty propTypes declaration |
rdp |
empty defaultProps declaration |
ren |
render method |
rcjc |
class component skeleton without import and default export lines |
Trigger |
Content |
it |
it Block |
Trigger |
Content |
imrs |
import React, { useState } from 'react'; |
imre |
import React, { useEffect } from 'react'; |
useState |
useState block |
useEffect |
useEffect block |
useContext |
useContext block |
describe |
describe Block |
test |
test Block |
tit |
it Block |
Trigger |
Content |
exp |
Export default module in ES6 syntax |
comment |
Comment Block |
rfc |
arrow function component skeleton |
rfcp |
arrow function component with prop types skeleton |
- Add dollar sign to TM_FILENAME_BASE variable
Trigger |
Content |
edl |
// eslint-disable-next-line |
rwwd |
class component without import statements |
cwm |
componentWillMount method |
cwr |
componentWillReceiveProps method |
cwup |
componentWillUpdate method |
Trigger |
Content |
rpc |
class pure component skeleton with prop types after the class |
rpt |
empty propTypes declaration |
rdp |
empty defaultProps declaration |
gsbu |
getSnapshotBeforeUpdate method |
gdsfp |
static getDerivedStateFromProps method |
cdc |
componentDidCatch method |
Trigger |
Content |
rsc |
stateless component skeleton |
Trigger |
Content |
rcfc |
class component skeleton that contains all the lifecycle methods |
Trigger |
Content |
imr |
import React from 'react'; |
imrpc |
import React, { PureComponent } from 'react'; |
ipt |
import PropTypes from 'prop-types'; |
cm |
Comment Block |
Trigger |
Content |
router |
import { } from 'react-router-dom'; |
Trigger |
Content |
rqr |
require('package'); |
mde |
module.exports = { }; |
edm |
export default moduleName; |
- move change log in README to CHANGELOG'
- Improve syntax detail experience
Add and improve syntax:
- imp
- router
- clg
- edl
- rscp
- sst
fix small bugs
update readme description
update readme and snippets name
update readme
modify snippets
Initial release of js-jsx-snippets