react-code-snippets README
A snippet library which includes simple daily use snippets
Languages supported
Javascript(js)
Typescript(ts)
Javascriptreact(jsx)
Typescriptreact(tsx)
All Commands - 7
cl
- Console Log
cls
- Console Log String
el
- Event Listener
oe
- On Event
race
- React Arrow functional Component Export
ac
- Arrow functional Component
acp
- Arrow functional Component with Props
amir
- return jsx while mapping an array
Snippets
cl
- Console Log
console.log();
cls
- Console Log String
console.log('');
el
- Event Listener
element.addEventListener('event', (e) => {});
oe
- On Event
onEvent={(e) => {}}
race
- React Arrow functional Component Export
import React from 'react';
const FileName = () => {
return(
<>
</>
)
}
export default FileName;
ac
- Arrow functional Component
const componentname = () => {
return (
<>
</>
)
}
acp
- Arrow functional Component with Props
const ComponentName = ({props}) => {
return (
<>
</>
)
}
amir
- return jsx while mapping an array
{array.map(item => {
return(
<element
key={item.key}
>
</element>
)
})}
Contributing
Contributions are always welcome!
The repo