From 381cdd73f9a3c6862014db6b36c22289d7e834d1 Mon Sep 17 00:00:00 2001 From: 30secondsofcode <30secondsofcode@gmail.com> Date: Tue, 24 Sep 2019 14:22:12 +0000 Subject: [PATCH] Travis build: 79 --- README.md | 2 +- snippet_data/snippetList.json | 2 +- snippet_data/snippets.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7d7888775..591045e8d 100644 --- a/README.md +++ b/README.md @@ -787,7 +787,7 @@ function LimitedWordTextarea({ rows, cols, value, limit }) { ```jsx ReactDOM.render( - , + , document.getElementById('root') ); ``` diff --git a/snippet_data/snippetList.json b/snippet_data/snippetList.json index c43ab6ed3..a35fa2de3 100644 --- a/snippet_data/snippetList.json +++ b/snippet_data/snippetList.json @@ -202,7 +202,7 @@ ] }, "meta": { - "hash": "daebbd819d3a73beb3a82ba3c9682b619fc1f663edaad8c60fab3e1b4b44c30c" + "hash": "ac22f33a0084fb444ce9e3cd7aebec507d6d785d1bc6e0a9cc5656f5ee0cb92f" } }, { diff --git a/snippet_data/snippets.json b/snippet_data/snippets.json index 0a7a6dde8..74a0559b6 100644 --- a/snippet_data/snippets.json +++ b/snippet_data/snippets.json @@ -263,7 +263,7 @@ "codeBlocks": { "style": "", "code": "function LimitedWordTextarea({ rows, cols, value, limit }) {\n const [content, setContent] = React.useState(value);\n const [wordCount, setWordCount] = React.useState(0);\n\n const setFormattedContent = text => {\n let words = text.split(' ');\n if (words.filter(Boolean).length > limit) {\n setContent(\n text\n .split(' ')\n .slice(0, limit)\n .join(' ')\n );\n setWordCount(limit);\n } else {\n setContent(text);\n setWordCount(words.filter(Boolean).length);\n }\n };\n\n React.useEffect(() => {\n setFormattedContent(content);\n }, []);\n\n return (\n
\n setFormattedContent(event.target.value)}\n value={content}\n />\n

\n {wordCount}/{limit}\n

\n
\n );\n}", - "example": "ReactDOM.render(\n ,\n document.getElementById('root')\n);" + "example": "ReactDOM.render(\n ,\n document.getElementById('root')\n);" }, "tags": [ "input", @@ -274,7 +274,7 @@ ] }, "meta": { - "hash": "daebbd819d3a73beb3a82ba3c9682b619fc1f663edaad8c60fab3e1b4b44c30c" + "hash": "ac22f33a0084fb444ce9e3cd7aebec507d6d785d1bc6e0a9cc5656f5ee0cb92f" } }, {