Generate templates (generate-react-cli) with Create-React-App (CRA) TypeScript project смотреть онлайн
As developers, we don’t like writing code again and again. generate-react-cli is a useful utility. It is a based-on templates, so we don’t need to write our code again and again.
If you come from Angular, you probably love the Angular CLI feature that it can generate templates for your project.
You can generate your project templates similarly using ‘generate-react-cli’ library in React. To install we will be using npx task script;
$ npx generate-react-cli component Header
First time running the script, it will install and create: generate-react-cli.json with the options you choose on the first time you use the tool, but feel free to change these manually.
To create your own custom component template file. Change ‘generate-react-cli.json’ to point to the templates files we will be creating;
{
"usesTypeScript": true,
"usesCssModule": false,
"cssPreprocessor": "scss",
"testLibrary": "Enzyme",
"component": {
"default": {
"path": "src/components",
"withStyle": true,
"withTest": true,
"withStory": false,
"withlazy": false
},
"page": {
"customTemplates": {
"component": "templates/component/component.js",
"style": "templates/component/style.scss",
"test": "templates/component/test.js"
},
"path": "src/pages",
"withLazy": true,
"withStory": false,
"withStyle": true,
"withTest": true
},
"layout": {
"path": "src/layout",
"withLazy": false,
"withStory": false,
"withStyle": false,
"withTest": true
}
}
}
Here is an example of creating a custom template for React Home page component.
$ npx generate-react-cli component HomePage --type=page
Take the Digital Course & Get 40 Pages React Book
https://www.udemy.com/course/getting-started-react17-with-must-have-libraries/?referralCode=3E6A9B9D8EBB48A913A9
Get Free React 17 Book Chapter
https://elielrom.com/ReactBook
View the article on Medium
https://medium.com/react-courses/setting-up-professional-react-project-with-must-have-reactjs-libraries-2020-9358edf9acb3
Learning React?
https://github.com/EliEladElrom/react-tutorials
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Generate templates (generate-react-cli) with Create-React-App (CRA) TypeScript project» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.