From eb9a2dfaef2d56f1ce1bcec1af15c875bb079bf7 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Tue, 9 Oct 2018 19:12:21 +0300 Subject: [PATCH 1/3] Snippet template proposal Resolves #4. This is the snippet template that we have sort of decided on over the last couple of weeks. Please comment below so we can conclude on a format and start working on #1. --- snippet-template.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 snippet-template.md diff --git a/snippet-template.md b/snippet-template.md new file mode 100644 index 000000000..2559cbc9f --- /dev/null +++ b/snippet-template.md @@ -0,0 +1,29 @@ +### componentName + +Explain briefly what the snippet does. + +Explain briefly how the snippet works. + +```jsx +function componentName(props) { + return
{props}
; +}; +``` + +```jsx +class componentName extends React.Component { + constructor(props){} + render(){ + return
{props}
; + } +} +``` + + + + + From 3074396839b38e7cf329244dc8881aee021ab87f Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Tue, 9 Oct 2018 19:14:24 +0300 Subject: [PATCH 2/3] Update snippet-template.md --- snippet-template.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/snippet-template.md b/snippet-template.md index 2559cbc9f..a52e0f4f5 100644 --- a/snippet-template.md +++ b/snippet-template.md @@ -1,17 +1,17 @@ -### componentName +### ComponentName Explain briefly what the snippet does. Explain briefly how the snippet works. ```jsx -function componentName(props) { +function ComponentName(props) { return
{props}
; }; ``` ```jsx -class componentName extends React.Component { +class ComponentName extends React.Component { constructor(props){} render(){ return
{props}
; @@ -19,6 +19,10 @@ class componentName extends React.Component { } ``` +```jsx +ReactDOM.render(, mountNode); +``` + From 4ebcae2f1ff7e136ecc05f98ecccc2eeccf8ce65 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Tue, 9 Oct 2018 20:56:23 +0300 Subject: [PATCH 3/3] Update snippet-template.md --- snippet-template.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/snippet-template.md b/snippet-template.md index a52e0f4f5..9a54d0fa0 100644 --- a/snippet-template.md +++ b/snippet-template.md @@ -27,7 +27,8 @@ ReactDOM.render(, mountNode);