├── lectures
├── 11-js-dom
│ ├── practice
│ │ ├── main
│ │ │ ├── script.js
│ │ │ ├── test.html
│ │ │ └── styles.css
│ │ ├── events
│ │ │ ├── styles.css
│ │ │ ├── index.html
│ │ │ └── script.js
│ │ ├── load-scripts
│ │ │ └── style.css
│ │ ├── practice-2
│ │ │ ├── load-scripts
│ │ │ │ └── style.css
│ │ │ └── mouse-events
│ │ │ │ └── index.html
│ │ └── practice-1
│ │ │ ├── assets
│ │ │ ├── icons
│ │ │ │ ├── github.png
│ │ │ │ ├── twitter.png
│ │ │ │ ├── upIcon.png
│ │ │ │ ├── youtube.png
│ │ │ │ ├── colorMode.png
│ │ │ │ ├── linkedIn.png
│ │ │ │ ├── downloadArrow.png
│ │ │ │ └── youtube.svg
│ │ │ └── images
│ │ │ │ ├── Project1.png
│ │ │ │ ├── Project2.png
│ │ │ │ ├── Project3.png
│ │ │ │ ├── Project4.png
│ │ │ │ ├── Project5.png
│ │ │ │ ├── Project6.png
│ │ │ │ └── userImg.png
│ │ │ ├── script
│ │ │ ├── 3-attributes.js
│ │ │ ├── 8-delegation.js
│ │ │ ├── 5-classes.js
│ │ │ ├── 4-modifying.js
│ │ │ ├── 2-node-properties.js
│ │ │ └── 7-events.js
│ │ │ ├── styles
│ │ │ ├── delegation.css
│ │ │ └── sizing.css
│ │ │ ├── sizing.html
│ │ │ ├── events.html
│ │ │ └── delegation.html
│ └── task.md
├── 10-js-advanced-3
│ └── practice
│ │ ├── test
│ │ ├── index.js
│ │ └── expressions.js
│ │ ├── modules
│ │ ├── user.js
│ │ ├── index.js
│ │ ├── helpers.js
│ │ ├── math.js
│ │ └── main.js
│ │ ├── event-loop.js
│ │ └── async-await.js
├── 22-nextjs-1
│ ├── practice
│ │ ├── src
│ │ │ ├── app
│ │ │ │ ├── react-csr-approach
│ │ │ │ │ ├── page.module.css
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── api
│ │ │ │ │ └── tasks
│ │ │ │ │ │ └── route.ts
│ │ │ │ ├── fetch-api-approach-no-cache
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── fetch-api-approach-cache
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── globals.css
│ │ │ │ ├── layout.tsx
│ │ │ │ └── tasks
│ │ │ │ │ └── [id]
│ │ │ │ │ └── page.tsx
│ │ │ ├── interfaces
│ │ │ │ └── task.ts
│ │ │ └── components
│ │ │ │ └── Tasks
│ │ │ │ ├── styles.module.css
│ │ │ │ └── index.tsx
│ │ ├── public
│ │ │ ├── vercel.svg
│ │ │ ├── window.svg
│ │ │ ├── file.svg
│ │ │ └── globe.svg
│ │ ├── next.config.ts
│ │ ├── eslint.config.mjs
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── assets
│ │ ├── Screenshot 2025-06-01 at 18.23.08.png
│ │ └── Screenshot 2025-06-01 at 18.32.19.png
│ ├── server
│ │ ├── package.json
│ │ └── index.js
│ ├── .gitignore
│ └── task.md
├── .DS_Store
├── 18-react-basics
│ ├── practice
│ │ ├── my-app
│ │ │ ├── .eslintrc.json
│ │ │ ├── jsconfig.json
│ │ │ ├── next.config.js
│ │ │ ├── src
│ │ │ │ ├── app
│ │ │ │ │ ├── favicon.ico
│ │ │ │ │ ├── page.js
│ │ │ │ │ └── layout.js
│ │ │ │ ├── components
│ │ │ │ │ └── Example
│ │ │ │ │ │ └── index.js
│ │ │ │ └── mock
│ │ │ │ │ └── people.js
│ │ │ ├── package.json
│ │ │ ├── .gitignore
│ │ │ └── public
│ │ │ │ └── vercel.svg
│ │ ├── example-1
│ │ │ ├── index.js
│ │ │ └── index.html
│ │ └── index.html
│ └── task.md
├── 16-typescript-advanced
│ ├── code_examples
│ │ ├── 8-nullish-coalescence.ts
│ │ ├── tsconfig.json
│ │ ├── package.json
│ │ ├── 7-keyof.ts
│ │ ├── 2-enums.ts
│ │ └── 6-utility-types.ts
│ └── README.md
├── 17-patterns
│ ├── tsconfig.json
│ └── practice
│ │ ├── creational
│ │ ├── 3.prototype.js
│ │ ├── 4.singleton.js
│ │ ├── 1.constructor.js
│ │ └── 5.builder.js
│ │ ├── behaviour
│ │ ├── 3.iterator.js
│ │ ├── 4.observer.js
│ │ ├── 7.strategy.ts
│ │ └── 5.mediator.js
│ │ ├── structural
│ │ ├── 2.decorator.js
│ │ ├── 6.flyweight.js
│ │ ├── 3.facade.js
│ │ └── 1.adapter.js
│ │ └── di
│ │ ├── 1.wtihout-di.js
│ │ └── 2.with-di.js
├── 15-typescript-basics
│ ├── code_examples
│ │ ├── tsconfig.json
│ │ ├── package.json
│ │ ├── package-lock.json
│ │ ├── 2-array-types.ts
│ │ ├── 4-object.ts
│ │ └── 5-type-aliases.ts
│ └── README.md
├── 24-next-js-3
│ ├── task.md
│ └── README.md
├── 25-testing
│ ├── practice
│ │ ├── react-example
│ │ │ └── my-app
│ │ │ │ ├── public
│ │ │ │ ├── robots.txt
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── logo192.png
│ │ │ │ ├── logo512.png
│ │ │ │ └── manifest.json
│ │ │ │ ├── src
│ │ │ │ ├── components
│ │ │ │ │ ├── Button.js
│ │ │ │ │ ├── Scenario.js
│ │ │ │ │ ├── FocusInput.test.js
│ │ │ │ │ ├── FocusInput.js
│ │ │ │ │ ├── ChangeInput.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── ChangeInput.test.js
│ │ │ │ │ ├── Button.test.js
│ │ │ │ │ ├── Counter.js
│ │ │ │ │ └── useAPI.js
│ │ │ │ ├── setupTests.js
│ │ │ │ ├── App.test.js
│ │ │ │ ├── index.css
│ │ │ │ ├── reportWebVitals.js
│ │ │ │ ├── index.js
│ │ │ │ ├── App.js
│ │ │ │ └── App.css
│ │ │ │ ├── .gitignore
│ │ │ │ └── package.json
│ │ └── calculator-test-jest
│ │ │ ├── coverage
│ │ │ ├── lcov-report
│ │ │ │ ├── favicon.png
│ │ │ │ ├── sort-arrow-sprite.png
│ │ │ │ └── prettify.css
│ │ │ ├── lcov.info
│ │ │ └── clover.xml
│ │ │ ├── package.json
│ │ │ ├── calculator.js
│ │ │ └── calculator.test.js
│ ├── task.md
│ └── README.md
├── 13-environment-and-preprocessors
│ ├── practice
│ │ ├── styles.css.map
│ │ ├── styles.css
│ │ ├── styles.scss
│ │ ├── package.json
│ │ └── index.html
│ └── README.md
├── 03-html-basics
│ ├── practice
│ │ └── test.html
│ ├── task.md
│ └── README.md
├── 04-css
│ ├── practice
│ │ ├── grid
│ │ │ └── styles.css
│ │ ├── z-index
│ │ │ ├── index.html
│ │ │ └── styles.css
│ │ ├── flexbox
│ │ │ └── styles.css
│ │ └── positioning
│ │ │ ├── styles.css
│ │ │ └── index.html
│ └── task.md
├── 07-js-basics-2
│ ├── task.md
│ └── README.md
├── 06-js-basics-1
│ └── task.md
├── 05-css-advanced
│ ├── task.md
│ └── practice
│ │ ├── css-transforms
│ │ └── styles.css
│ │ └── css-animations
│ │ └── index.html
├── 19-react-ui
│ ├── README.md
│ └── task.md
├── 12-data-structures-and-algorithms
│ └── README.md
├── 08-js-advanced
│ └── README.md
├── 02-git
│ └── README.md
└── 09-js-advanced-2
│ └── README.md
├── workshops
├── ui-libraries
│ ├── material-ui-nextjs-ts
│ │ ├── public
│ │ │ └── .gitkeep
│ │ ├── next.config.mjs
│ │ ├── src
│ │ │ ├── app
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── layout.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ └── about
│ │ │ │ │ └── page.tsx
│ │ │ ├── components
│ │ │ │ ├── Copyright.tsx
│ │ │ │ └── ProTip.tsx
│ │ │ └── theme.ts
│ │ ├── next-env.d.ts
│ │ ├── .gitignore
│ │ ├── tsconfig.json
│ │ └── package.json
│ ├── material-ui-nextjs-pages-router-ts
│ │ ├── next.config.js
│ │ ├── public
│ │ │ └── favicon.ico
│ │ ├── src
│ │ │ ├── Copyright.tsx
│ │ │ └── ProTip.tsx
│ │ ├── .gitignore
│ │ ├── tsconfig.json
│ │ ├── pages
│ │ │ ├── test.tsx
│ │ │ ├── _app.tsx
│ │ │ ├── index.tsx
│ │ │ ├── _document.tsx
│ │ │ └── about.tsx
│ │ └── package.json
│ ├── with-ant-design-app
│ │ ├── app
│ │ │ ├── favicon.ico
│ │ │ ├── themeConfig.ts
│ │ │ ├── globals.css
│ │ │ ├── layout.tsx
│ │ │ └── AntdRegistry.tsx
│ │ ├── next.config.js
│ │ ├── .gitignore
│ │ ├── tsconfig.json
│ │ └── package.json
│ ├── with-react-bootstrap-app
│ │ ├── public
│ │ │ ├── favicon.ico
│ │ │ ├── favicon-32x32.png
│ │ │ └── vercel.svg
│ │ ├── pages
│ │ │ └── _app.jsx
│ │ ├── package.json
│ │ ├── style
│ │ │ └── index.css
│ │ └── .gitignore
│ ├── with-chakra-ui-app
│ │ ├── src
│ │ │ ├── components
│ │ │ │ ├── Footer.tsx
│ │ │ │ ├── Main.tsx
│ │ │ │ ├── Container.tsx
│ │ │ │ ├── Hero.tsx
│ │ │ │ ├── DarkModeSwitch.tsx
│ │ │ │ └── CTA.tsx
│ │ │ ├── pages
│ │ │ │ ├── _app.tsx
│ │ │ │ └── _document.tsx
│ │ │ └── theme.tsx
│ │ ├── .gitignore
│ │ ├── tsconfig.json
│ │ └── package.json
│ └── README.md
├── state-management-react
│ ├── context
│ │ ├── src
│ │ │ ├── interfaces
│ │ │ │ ├── index.ts
│ │ │ │ └── order.ts
│ │ │ ├── app
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── page.tsx
│ │ │ │ └── orders
│ │ │ │ │ └── page.tsx
│ │ │ ├── components
│ │ │ │ └── index.ts
│ │ │ └── theme.tsx
│ │ ├── public
│ │ │ ├── vercel.svg
│ │ │ ├── window.svg
│ │ │ ├── file.svg
│ │ │ └── globe.svg
│ │ ├── .prettierrc
│ │ ├── next.config.ts
│ │ ├── eslint.config.mjs
│ │ ├── .gitignore
│ │ ├── tsconfig.json
│ │ └── package.json
│ ├── rtk
│ │ ├── src
│ │ │ ├── interfaces
│ │ │ │ ├── index.ts
│ │ │ │ └── order.ts
│ │ │ ├── store
│ │ │ │ ├── api
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── orders.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── slices
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── counter.ts
│ │ │ │ │ └── selectedOrders.ts
│ │ │ ├── app
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── page.tsx
│ │ │ │ ├── orders
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── ordersByPage
│ │ │ │ │ └── page.tsx
│ │ │ │ └── StoreProvider.tsx
│ │ │ ├── theme.tsx
│ │ │ └── components
│ │ │ │ └── index.ts
│ │ ├── public
│ │ │ ├── vercel.svg
│ │ │ ├── file.svg
│ │ │ ├── window.svg
│ │ │ └── globe.svg
│ │ ├── .prettierrc
│ │ ├── next.config.ts
│ │ ├── lib
│ │ │ ├── hooks.ts
│ │ │ └── store.ts
│ │ ├── eslint.config.mjs
│ │ ├── .gitignore
│ │ ├── tsconfig.json
│ │ └── package.json
│ ├── tanstack-query
│ │ ├── src
│ │ │ ├── interfaces
│ │ │ │ ├── index.ts
│ │ │ │ └── order.ts
│ │ │ ├── app
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── page.tsx
│ │ │ │ ├── orders
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── ordersByPage
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── StoreProvider.tsx
│ │ │ │ └── get-query-client.ts
│ │ │ ├── services
│ │ │ │ └── orders.ts
│ │ │ ├── theme.tsx
│ │ │ └── components
│ │ │ │ ├── index.ts
│ │ │ │ ├── OrdersByPage
│ │ │ │ └── index.tsx
│ │ │ │ └── OrdersContainer
│ │ │ │ └── index.tsx
│ │ ├── public
│ │ │ ├── vercel.svg
│ │ │ ├── window.svg
│ │ │ ├── file.svg
│ │ │ └── globe.svg
│ │ ├── .prettierrc
│ │ ├── next.config.ts
│ │ ├── eslint.config.mjs
│ │ ├── .gitignore
│ │ ├── tsconfig.json
│ │ └── package.json
│ ├── .DS_Store
│ ├── pure-redux-example
│ │ ├── jsconfig.json
│ │ ├── next.config.js
│ │ ├── public
│ │ │ ├── favicon.ico
│ │ │ └── vercel.svg
│ │ ├── src
│ │ │ ├── common
│ │ │ │ └── mui
│ │ │ │ │ └── createCache.js
│ │ │ ├── store
│ │ │ │ ├── reducers
│ │ │ │ │ ├── rootReducer.js
│ │ │ │ │ ├── selectedOrders.js
│ │ │ │ │ └── orders.js
│ │ │ │ ├── actions
│ │ │ │ │ ├── selectedOrdersAction.js
│ │ │ │ │ └── ordersAction.js
│ │ │ │ └── store.js
│ │ │ ├── layout
│ │ │ │ └── MainLayout.js
│ │ │ ├── containers
│ │ │ │ ├── Home.js
│ │ │ │ └── Orders.js
│ │ │ ├── pages
│ │ │ │ ├── index.js
│ │ │ │ ├── orders.js
│ │ │ │ └── _app.js
│ │ │ ├── styles
│ │ │ │ └── theme.js
│ │ │ └── components
│ │ │ │ └── Orders
│ │ │ │ └── components
│ │ │ │ └── OrderItem.js
│ │ ├── .gitignore
│ │ └── package.json
│ └── README.md
└── .DS_Store
└── .DS_Store
/lectures/11-js-dom/practice/main/script.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lectures/10-js-advanced-3/practice/test/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/events/styles.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/public/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/app/react-csr-approach/page.module.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/load-scripts/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 40px;
3 | }
4 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/.DS_Store
--------------------------------------------------------------------------------
/workshops/state-management-react/context/src/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export * from './order';
2 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export * from './order';
2 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/store/api/index.ts:
--------------------------------------------------------------------------------
1 | export * from './orders';
2 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-2/load-scripts/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 40px;
3 | }
4 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export * from './order';
2 |
--------------------------------------------------------------------------------
/lectures/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/.DS_Store
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/workshops/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/.DS_Store
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/store/index.ts:
--------------------------------------------------------------------------------
1 | export * from './api';
2 | export * from './slices';
3 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | export default function Home() {
2 | return
Home
;
3 | }
4 |
--------------------------------------------------------------------------------
/lectures/16-typescript-advanced/code_examples/8-nullish-coalescence.ts:
--------------------------------------------------------------------------------
1 | console.log(0 || 1);
2 | console.log(0 ?? 1);
3 |
--------------------------------------------------------------------------------
/lectures/17-patterns/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "strictPropertyInitialization": false
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/lectures/15-typescript-basics/code_examples/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "strictNullChecks": false
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/lectures/16-typescript-advanced/code_examples/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "strictNullChecks": true
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/lectures/24-next-js-3/task.md:
--------------------------------------------------------------------------------
1 | # Homework: Country Explorer (Next.js App Router)
2 |
3 | ## Goal
4 |
5 | Migrate your previous HW to App Router
6 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/workshops/state-management-react/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/state-management-react/.DS_Store
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "paths": {
4 | "@/*": ["./src/*"]
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {}
3 |
4 | module.exports = nextConfig
5 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {};
3 |
4 | export default nextConfig;
5 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/22-nextjs-1/practice/src/app/favicon.ico
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "paths": {
4 | "@/*": ["./src/*"]
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/lectures/10-js-advanced-3/practice/test/expressions.js:
--------------------------------------------------------------------------------
1 | function test() {
2 | console.log("Test");
3 | }
4 |
5 | export const qwerty = 123;
6 |
7 | export default test;
8 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | module.exports = {
3 | reactStrictMode: true,
4 | };
5 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/state-management-react/rtk/src/app/favicon.ico
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/store/slices/index.ts:
--------------------------------------------------------------------------------
1 | export { default as selectedOrders } from './selectedOrders';
2 | export { default as counter } from './counter';
3 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 100,
3 | "singleQuote": true,
4 | "tabWidth": 2,
5 | "endOfLine": "lf",
6 | "trailingComma": "all"
7 | }
8 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-ant-design-app/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/ui-libraries/with-ant-design-app/app/favicon.ico
--------------------------------------------------------------------------------
/lectures/13-environment-and-preprocessors/practice/styles.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sourceRoot":"","sources":["styles.scss"],"names":[],"mappings":"AAEI;EACE;EACA;;AAGF;EACE","file":"styles.css"}
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/18-react-basics/practice/my-app/src/app/favicon.ico
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/interfaces/task.ts:
--------------------------------------------------------------------------------
1 | export interface Task {
2 | id: number;
3 | title: string;
4 | description: string;
5 | status: string;
6 | date: string;
7 | }
8 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 100,
3 | "singleQuote": true,
4 | "tabWidth": 2,
5 | "endOfLine": "lf",
6 | "trailingComma": "all"
7 | }
8 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/state-management-react/context/src/app/favicon.ico
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/icons/github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/icons/github.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/icons/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/icons/twitter.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/icons/upIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/icons/upIcon.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/icons/youtube.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/icons/youtube.png
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 100,
3 | "singleQuote": true,
4 | "tabWidth": 2,
5 | "endOfLine": "lf",
6 | "trailingComma": "all"
7 | }
8 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/icons/colorMode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/icons/colorMode.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/icons/linkedIn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/icons/linkedIn.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/images/Project1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/images/Project1.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/images/Project2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/images/Project2.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/images/Project3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/images/Project3.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/images/Project4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/images/Project4.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/images/Project5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/images/Project5.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/images/Project6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/images/Project6.png
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/images/userImg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/images/userImg.png
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/assets/Screenshot 2025-06-01 at 18.23.08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/22-nextjs-1/assets/Screenshot 2025-06-01 at 18.23.08.png
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/assets/Screenshot 2025-06-01 at 18.32.19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/22-nextjs-1/assets/Screenshot 2025-06-01 at 18.32.19.png
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/ui-libraries/material-ui-nextjs-ts/src/app/favicon.ico
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-ant-design-app/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | };
5 |
6 | module.exports = nextConfig;
7 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-react-bootstrap-app/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/ui-libraries/with-react-bootstrap-app/public/favicon.ico
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/25-testing/practice/react-example/my-app/public/favicon.ico
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/25-testing/practice/react-example/my-app/public/logo192.png
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/25-testing/practice/react-example/my-app/public/logo512.png
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | }
5 |
6 | module.exports = nextConfig
7 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/state-management-react/tanstack-query/src/app/favicon.ico
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/icons/downloadArrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/11-js-dom/practice/practice-1/assets/icons/downloadArrow.png
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/state-management-react/pure-redux-example/public/favicon.ico
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/next.config.ts:
--------------------------------------------------------------------------------
1 | import type { NextConfig } from "next";
2 |
3 | const nextConfig: NextConfig = {
4 | /* config options here */
5 | };
6 |
7 | export default nextConfig;
8 |
--------------------------------------------------------------------------------
/lectures/03-html-basics/practice/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/next.config.ts:
--------------------------------------------------------------------------------
1 | import type { NextConfig } from "next";
2 |
3 | const nextConfig: NextConfig = {
4 | /* config options here */
5 | };
6 |
7 | export default nextConfig;
8 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-react-bootstrap-app/public/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/ui-libraries/with-react-bootstrap-app/public/favicon-32x32.png
--------------------------------------------------------------------------------
/lectures/25-testing/task.md:
--------------------------------------------------------------------------------
1 | # Testing
2 |
3 | Add unit tests for your todo app homework(lecture #19 or #20 up to you)
4 |
5 | AC:
6 |
7 | - Add at least three unit tests in your project
8 |
9 | Good Luck!
10 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export { default as Header } from './Header';
2 | export { default as Orders } from './Orders';
3 | export { default as OrderItem } from './OrderItem';
4 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/next.config.ts:
--------------------------------------------------------------------------------
1 | import type { NextConfig } from "next";
2 |
3 | const nextConfig: NextConfig = {
4 | /* config options here */
5 | };
6 |
7 | export default nextConfig;
8 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/public/favicon.ico
--------------------------------------------------------------------------------
/lectures/10-js-advanced-3/practice/modules/user.js:
--------------------------------------------------------------------------------
1 | export default class User {
2 | constructor(name) {
3 | this.name = name;
4 | }
5 |
6 | greet() {
7 | return `Hello, ${this.name}!`;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/interfaces/order.ts:
--------------------------------------------------------------------------------
1 | export interface Order {
2 | id: string;
3 | date: string;
4 | name: string;
5 | shipTo: string;
6 | paymentMethod: string;
7 | amount: number;
8 | }
9 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/src/interfaces/order.ts:
--------------------------------------------------------------------------------
1 | export interface Order {
2 | id: string;
3 | date: string;
4 | name: string;
5 | shipTo: string;
6 | paymentMethod: string;
7 | amount: number;
8 | }
9 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/src/components/Footer.tsx:
--------------------------------------------------------------------------------
1 | import { Flex, FlexProps } from "@chakra-ui/react";
2 |
3 | export const Footer = (props: FlexProps) => (
4 |
5 | );
6 |
--------------------------------------------------------------------------------
/lectures/10-js-advanced-3/practice/modules/index.js:
--------------------------------------------------------------------------------
1 | export * from './math.js';
2 | export { default as User } from './user.js';
3 |
4 | // Re-export the default export from math.js
5 | export { default as multiply } from './math.js';
6 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/calculator-test-jest/coverage/lcov-report/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/25-testing/practice/calculator-test-jest/coverage/lcov-report/favicon.png
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/interfaces/order.ts:
--------------------------------------------------------------------------------
1 | export interface Order {
2 | id: string;
3 | date: string;
4 | name: string;
5 | shipTo: string;
6 | paymentMethod: string;
7 | amount: number;
8 | }
9 |
--------------------------------------------------------------------------------
/lectures/15-typescript-basics/code_examples/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ts-basics",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "license": "MIT",
6 | "dependencies": {
7 | "typescript": "^5.3.3"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/components/Button.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const Button = props => {
4 | return ;
5 | };
6 |
7 | export default Button;
8 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/common/mui/createCache.js:
--------------------------------------------------------------------------------
1 | import createCache from '@emotion/cache';
2 |
3 | export default function createEmotionCache() {
4 | return createCache({ key: 'css', prepend: true });
5 | }
6 |
--------------------------------------------------------------------------------
/lectures/10-js-advanced-3/practice/modules/helpers.js:
--------------------------------------------------------------------------------
1 | export { add, subtract } from './math.js';
2 | export { default as User } from './user.js';
3 |
4 | // Re-export the default export from math.js
5 | export { default as multiply } from './math.js';
6 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/src/components/Example/index.js:
--------------------------------------------------------------------------------
1 | import List from '../List';
2 |
3 | const Example = () => {
4 | return (
5 | <>
6 |
7 | >
8 | );
9 | };
10 |
11 | export default Example;
12 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/next.config.ts:
--------------------------------------------------------------------------------
1 | import type { NextConfig } from 'next';
2 |
3 | const nextConfig: NextConfig = {
4 | logging: {
5 | fetches: {
6 | fullUrl: true,
7 | },
8 | },
9 | };
10 |
11 | export default nextConfig;
12 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/calculator-test-jest/coverage/lcov-report/sort-arrow-sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/solvdinc/react-laba-international-4/HEAD/lectures/25-testing/practice/calculator-test-jest/coverage/lcov-report/sort-arrow-sprite.png
--------------------------------------------------------------------------------
/lectures/13-environment-and-preprocessors/practice/styles.css:
--------------------------------------------------------------------------------
1 | .container .nested .text {
2 | color: red;
3 | background-color: blue;
4 | }
5 | .container .nested .phone {
6 | color: green;
7 | }
8 |
9 | /*# sourceMappingURL=styles.css.map */
10 |
--------------------------------------------------------------------------------
/lectures/13-environment-and-preprocessors/practice/styles.scss:
--------------------------------------------------------------------------------
1 | .container {
2 | .nested {
3 | .text {
4 | color: red;
5 | background-color: blue;
6 | }
7 |
8 | .phone {
9 | color: green;
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-react-bootstrap-app/pages/_app.jsx:
--------------------------------------------------------------------------------
1 | import "bootstrap/dist/css/bootstrap.min.css";
2 | import "../style/index.css";
3 |
4 | export default function MyApp({ Component, pageProps }) {
5 | return ;
6 | }
7 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import { Orders } from '@/components';
2 |
3 | export default function Home() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-ant-design-app/app/themeConfig.ts:
--------------------------------------------------------------------------------
1 | import type { ThemeConfig } from "antd";
2 |
3 | const theme: ThemeConfig = {
4 | token: {
5 | fontSize: 16,
6 | colorPrimary: "#52c41a",
7 | },
8 | };
9 |
10 | export default theme;
11 |
--------------------------------------------------------------------------------
/lectures/16-typescript-advanced/code_examples/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ts-basics",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "license": "MIT",
6 | "dependencies": {
7 | "ts-node": "^10.9.2",
8 | "typescript": "^5.3.3"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/services/orders.ts:
--------------------------------------------------------------------------------
1 | const getOrders = async (page: number = 0) => {
2 | const req = await fetch(`api/orders?page=${page}`);
3 | const res = await req.json();
4 |
5 | return res;
6 | };
7 |
8 | export { getOrders };
9 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/basic-features/typescript for more information.
6 |
--------------------------------------------------------------------------------
/lectures/04-css/practice/grid/styles.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 |
5 | .container {
6 | display: grid;
7 | grid-template-columns: repeat(3, 1fr);
8 | grid-template-rows: repeat(3, 200px);
9 | grid-auto-rows: 200px;
10 | grid-auto-flow: dense;
11 | }
12 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/src/app/orders/page.tsx:
--------------------------------------------------------------------------------
1 | import { Orders } from '@/components';
2 |
3 | export default function OrdersPage() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/store/reducers/rootReducer.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 | import orders from './orders';
3 | import selectedOrders from './selectedOrders';
4 |
5 | export default combineReducers({ orders, selectedOrders });
6 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import { OrdersContainer } from '@/components';
2 |
3 | export default function Home() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/app/orders/page.tsx:
--------------------------------------------------------------------------------
1 | import { OrdersContainer } from '@/components';
2 |
3 | export default function OrdersPage() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import { OrdersContainer } from '@/components';
2 |
3 | export default function Home() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/src/app/page.js:
--------------------------------------------------------------------------------
1 | import Example from '@/components/Example';
2 | import styles from './page.module.css';
3 |
4 | export default function Home() {
5 | return (
6 |
7 |
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/example-1/index.js:
--------------------------------------------------------------------------------
1 | const element = React.createElement('h1', {
2 | id: 'element-id',
3 | children: 'Heloo guys!',
4 | });
5 | const domContainer = document.querySelector('#root_container');
6 | const root = ReactDOM.createRoot(domContainer);
7 | root.render(element);
8 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/src/theme.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 | import { createTheme } from '@mui/material/styles';
3 |
4 | const theme = createTheme({
5 | typography: {
6 | fontFamily: 'var(--font-roboto)',
7 | },
8 | cssVariables: true,
9 | });
10 |
11 | export default theme;
12 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/app/ordersByPage/page.tsx:
--------------------------------------------------------------------------------
1 | import { OrdersByPage } from '@/components';
2 |
3 | export default function OrdersByPageComponent() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/theme.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 | import { createTheme } from '@mui/material/styles';
3 |
4 | const theme = createTheme({
5 | typography: {
6 | fontFamily: 'var(--font-roboto)',
7 | },
8 | cssVariables: true,
9 | });
10 |
11 | export default theme;
12 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/app/orders/page.tsx:
--------------------------------------------------------------------------------
1 | import { OrdersContainer } from '@/components';
2 |
3 | export default function OrdersPage() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/script/3-attributes.js:
--------------------------------------------------------------------------------
1 | const tabButtons = document.querySelector('.tabs-buttons');
2 |
3 | const tabButtonsClickHanlder = e => {
4 | const tab = e.target.dataset.tab;
5 | console.log(tab);
6 | };
7 |
8 | tabButtons.addEventListener('click', tabButtonsClickHanlder);
9 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/app/ordersByPage/page.tsx:
--------------------------------------------------------------------------------
1 | import { OrdersByPage } from '@/components';
2 |
3 | export default function OrdersByPageComponent() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/theme.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 | import { createTheme } from '@mui/material/styles';
3 |
4 | const theme = createTheme({
5 | typography: {
6 | fontFamily: 'var(--font-roboto)',
7 | },
8 | cssVariables: true,
9 | });
10 |
11 | export default theme;
12 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/lectures/10-js-advanced-3/practice/modules/math.js:
--------------------------------------------------------------------------------
1 | export function add(a, b) {
2 | return a + b;
3 | }
4 |
5 | export function subtract(a, b) {
6 | return a - b;
7 | }
8 |
9 | export const PI = 3.14159;
10 |
11 | // Export a default value
12 | export default function multiply(a, b) {
13 | return a * b;
14 | }
15 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/layout/MainLayout.js:
--------------------------------------------------------------------------------
1 | import Header from './components/Header';
2 |
3 | const MainLayout = ({ children }) => {
4 | return (
5 | <>
6 |
7 | {children}
8 |
9 | >
10 | );
11 | };
12 |
13 | export default MainLayout;
14 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/script/8-delegation.js:
--------------------------------------------------------------------------------
1 | // const playground = document.querySelector('.playground');
2 |
3 | // const clickHandler = (e) => {
4 | // const cellNum = e.target.dataset.cell;
5 |
6 | // console.log(cellNum);
7 | // };
8 |
9 | // playground.addEventListener('click', clickHandler);
10 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/App.test.js:
--------------------------------------------------------------------------------
1 | import {render, screen} from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render();
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export { default as Header } from './Header';
2 | export { default as Orders } from './Orders';
3 | export { default as OrderItem } from './OrderItem';
4 | export { default as OrdersContainer } from './OrdersContainer';
5 | export { default as OrdersByPage } from './OrdersByPage';
6 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/containers/Home.js:
--------------------------------------------------------------------------------
1 | import Orders from '@/components/Orders/Orders';
2 | import { Container } from '@mui/system';
3 |
4 | const Home = () => (
5 | <>
6 |
7 | Home Page
8 |
9 |
10 | >
11 | );
12 |
13 | export default Home;
14 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/containers/Orders.js:
--------------------------------------------------------------------------------
1 | import Orders from '@/components/Orders/Orders';
2 | import { Container } from '@mui/system';
3 |
4 | const OrdersContainer = () => (
5 |
6 | Orders Page
7 |
8 |
9 | );
10 |
11 | export default OrdersContainer;
12 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export { default as Header } from './Header';
2 | export { default as Orders } from './Orders';
3 | export { default as OrderItem } from './OrderItem';
4 | export { default as OrdersContainer } from './OrdersContainer';
5 | export { default as OrdersByPage } from './OrdersByPage';
6 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/src/components/Main.tsx:
--------------------------------------------------------------------------------
1 | import { Stack, StackProps } from "@chakra-ui/react";
2 |
3 | export const Main = (props: StackProps) => (
4 |
13 | );
14 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/main/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Document
7 |
8 |
9 |
10 | HOME
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/creational/3.prototype.js:
--------------------------------------------------------------------------------
1 | const car = {
2 | wheels: 4,
3 |
4 | init() {
5 | console.log(`I have ${this.wheels}`);
6 | },
7 | };
8 |
9 | const carWithOwner = Object.create(car, { owner: { value: 'Misha' } });
10 |
11 | console.log(car);
12 | console.log(carWithOwner.owner);
13 | console.log(carWithOwner.wheels);
14 | carWithOwner.init();
15 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/store/actions/selectedOrdersAction.js:
--------------------------------------------------------------------------------
1 | export const ADD_ORDER = 'ADD_ORDER';
2 | export const DELETE_ORDER = 'DELETE_ORDER';
3 |
4 | export const addOrder = (id) => ({
5 | type: ADD_ORDER,
6 | payload: { id },
7 | });
8 |
9 | export const deleteOrder = (id) => ({
10 | type: DELETE_ORDER,
11 | payload: { id },
12 | });
13 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/pages/index.js:
--------------------------------------------------------------------------------
1 | import Home from '@/containers/Home';
2 | import MainLayout from '@/layout/MainLayout';
3 | import { Inter } from 'next/font/google';
4 |
5 | const inter = Inter({ subsets: ['latin'] });
6 |
7 | export default function HomePage() {
8 | return (
9 |
10 |
11 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-react-bootstrap-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "next dev",
5 | "build": "next build",
6 | "start": "next start"
7 | },
8 | "dependencies": {
9 | "bootstrap": "^4.4.1",
10 | "next": "latest",
11 | "react": "^18.2.0",
12 | "react-bootstrap": "^1.0.1",
13 | "react-dom": "^18.2.0"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/pages/orders.js:
--------------------------------------------------------------------------------
1 | import Orders from '@/containers/Orders';
2 | import MainLayout from '@/layout/MainLayout';
3 | import { Inter } from 'next/font/google';
4 |
5 | const inter = Inter({ subsets: ['latin'] });
6 |
7 | export default function ProjectsPage() {
8 | return (
9 |
10 |
11 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/calculator-test-jest/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "calculator-test-jest",
3 | "version": "1.0.0",
4 | "description": "testing example",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "jest",
8 | "test-with-coverage": "jest --coverage"
9 | },
10 | "author": "",
11 | "license": "ISC",
12 | "devDependencies": {
13 | "jest": "^29.0.3"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/public/window.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/public/file.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "scripts": {
6 | "test": "echo \"Error: no test specified\" && exit 1",
7 | "dev": "nodemon index.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "description": "",
12 | "dependencies": {
13 | "cors": "^2.8.5",
14 | "express": "^5.1.0",
15 | "nodemon": "^3.1.10"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/src/pages/_app.tsx:
--------------------------------------------------------------------------------
1 | import { ChakraProvider } from "@chakra-ui/react";
2 |
3 | import theme from "../theme";
4 | import { AppProps } from "next/app";
5 |
6 | function MyApp({ Component, pageProps }: AppProps) {
7 | return (
8 |
9 |
10 |
11 | );
12 | }
13 |
14 | export default MyApp;
15 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/public/window.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/public/file.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/public/window.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/public/file.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/public/window.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/public/file.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/styles/theme.js:
--------------------------------------------------------------------------------
1 | import { createTheme } from '@mui/material/styles';
2 | import { red } from '@mui/material/colors';
3 | // Create a theme instance.
4 | const theme = createTheme({
5 | palette: {
6 | primary: {
7 | main: '#556cd6',
8 | },
9 | secondary: {
10 | main: '#19857b',
11 | },
12 | error: {
13 | main: red.A400,
14 | },
15 | },
16 | });
17 | export default theme;
18 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/lib/hooks.ts:
--------------------------------------------------------------------------------
1 | import { useDispatch, useSelector, useStore } from 'react-redux';
2 | import type { RootState, AppDispatch, AppStore } from './store';
3 |
4 | // Use throughout your app instead of plain `useDispatch` and `useSelector`
5 | export const useAppDispatch = useDispatch.withTypes();
6 | export const useAppSelector = useSelector.withTypes();
7 | export const useAppStore = useStore.withTypes();
8 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/main/styles.css:
--------------------------------------------------------------------------------
1 | .sizing-1 {
2 | box-sizing: border-box;
3 | width: 500px;
4 | height: 500px;
5 | background: red;
6 | padding: 20px;
7 | border: 20px solid purple;
8 | }
9 |
10 | .sizing-2 {
11 | border: 20px solid purple;
12 | box-sizing: border-box;
13 | background: rgba(145, 120, 120, 0.6);
14 | margin-top: 50px;
15 | width: 50px;
16 | width: 500px;
17 | height: 500px;
18 | overflow: auto;
19 | padding: 20px;
20 | }
21 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "eslint": "8.49.0",
13 | "eslint-config-next": "13.4.19",
14 | "next": "13.4.19",
15 | "react": "18.2.0",
16 | "react-dom": "18.2.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-react-bootstrap-app/style/index.css:
--------------------------------------------------------------------------------
1 | .md-container {
2 | max-width: 800px;
3 | padding-top: 2rem;
4 | }
5 |
6 | .sml-card {
7 | width: 22rem;
8 | margin: 1rem 0;
9 | }
10 |
11 | .cntr-footer {
12 | height: 80px;
13 | margin-top: 20px;
14 | display: flex;
15 | align-items: center;
16 | justify-content: center;
17 | border-top: 1px solid #ccc;
18 | }
19 |
20 | .sml-logo {
21 | height: 1em;
22 | margin-left: 10px;
23 | }
24 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/calculator-test-jest/calculator.js:
--------------------------------------------------------------------------------
1 | const add = (x, y) => {
2 | return x + y;
3 | };
4 |
5 | const subtract = (x, y) => {
6 | return x - y;
7 | };
8 |
9 | const multiply = (x, y) => {
10 | return x * y;
11 | };
12 |
13 | const divide = (x, y) => {
14 | if (y === 0) {
15 | throw 'Cannot divide by 0!';
16 | }
17 | return x / y;
18 | };
19 |
20 | module.exports = {
21 | add,
22 | subtract,
23 | multiply,
24 | divide,
25 | };
26 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({getCLS, getFID, getFCP, getLCP, getTTFB}) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/src/components/Container.tsx:
--------------------------------------------------------------------------------
1 | import { Flex, FlexProps } from "@chakra-ui/react";
2 |
3 | export const Container = (props: FlexProps) => (
4 |
17 | );
18 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/store/reducers/selectedOrders.js:
--------------------------------------------------------------------------------
1 | import { ADD_ORDER, DELETE_ORDER } from '../actions/selectedOrdersAction';
2 |
3 | const selectedOrders = (state = [], action) => {
4 | switch (action.type) {
5 | case ADD_ORDER:
6 | return [...state, action.payload.id];
7 | case DELETE_ORDER:
8 | return state.filter((id) => id !== action.payload.id);
9 | default:
10 | return state;
11 | }
12 | };
13 |
14 | export default selectedOrders;
15 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/styles/delegation.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | padding: 0;
4 | margin: 0;
5 | }
6 |
7 | .playground {
8 | max-width: 1000px;
9 | width: 100%;
10 | margin: 0 auto;
11 | border: 2px solid blue;
12 | display: flex;
13 | flex-wrap: wrap;
14 | }
15 |
16 | .cell-item {
17 | width: 33.3333%;
18 | height: 200px;
19 | border: 2px solid green;
20 | display: flex;
21 | justify-content: center;
22 | align-items: center;
23 | }
24 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/behaviour/3.iterator.js:
--------------------------------------------------------------------------------
1 | class ArrayIterator {
2 | constructor(elements) {
3 | this.index = 0;
4 | this.elements = elements;
5 | }
6 |
7 | next() {
8 | return this.elements[this.index++];
9 | }
10 |
11 | hasNext() {
12 | return this.index < this.elements.length;
13 | }
14 | }
15 |
16 | const collection = new ArrayIterator(['Audi', 'BMW', 'Chevy', 'Ford']);
17 | while (collection.hasNext()) {
18 | console.log(collection.next());
19 | }
20 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/src/app/layout.js:
--------------------------------------------------------------------------------
1 | import './globals.css'
2 | import { Inter } from 'next/font/google'
3 |
4 | const inter = Inter({ subsets: ['latin'] })
5 |
6 | export const metadata = {
7 | title: 'Create Next App',
8 | description: 'Generated by create next app',
9 | }
10 |
11 | export default function RootLayout({ children }) {
12 | return (
13 |
14 | {children}
15 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { dirname } from "path";
2 | import { fileURLToPath } from "url";
3 | import { FlatCompat } from "@eslint/eslintrc";
4 |
5 | const __filename = fileURLToPath(import.meta.url);
6 | const __dirname = dirname(__filename);
7 |
8 | const compat = new FlatCompat({
9 | baseDirectory: __dirname,
10 | });
11 |
12 | const eslintConfig = [
13 | ...compat.extends("next/core-web-vitals", "next/typescript"),
14 | ];
15 |
16 | export default eslintConfig;
17 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { dirname } from "path";
2 | import { fileURLToPath } from "url";
3 | import { FlatCompat } from "@eslint/eslintrc";
4 |
5 | const __filename = fileURLToPath(import.meta.url);
6 | const __dirname = dirname(__filename);
7 |
8 | const compat = new FlatCompat({
9 | baseDirectory: __dirname,
10 | });
11 |
12 | const eslintConfig = [
13 | ...compat.extends("next/core-web-vitals", "next/typescript"),
14 | ];
15 |
16 | export default eslintConfig;
17 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-ant-design-app/app/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | :root {
6 | --foreground-rgb: 0, 0, 0;
7 | --background-start-rgb: 214, 219, 220;
8 | --background-end-rgb: 255, 255, 255;
9 | }
10 |
11 | body {
12 | color: rgb(var(--foreground-rgb));
13 | background: linear-gradient(
14 | to bottom,
15 | transparent,
16 | rgb(var(--background-end-rgb))
17 | )
18 | rgb(var(--background-start-rgb));
19 | }
20 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/components/Scenario.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const Scenario = props => (
4 |
5 |
{props.title}
6 |
{props.description}
7 |
{props.component}
8 |
11 | {props.snippet}
12 |
13 | );
14 |
15 | export default Scenario;
16 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { dirname } from "path";
2 | import { fileURLToPath } from "url";
3 | import { FlatCompat } from "@eslint/eslintrc";
4 |
5 | const __filename = fileURLToPath(import.meta.url);
6 | const __dirname = dirname(__filename);
7 |
8 | const compat = new FlatCompat({
9 | baseDirectory: __dirname,
10 | });
11 |
12 | const eslintConfig = [
13 | ...compat.extends("next/core-web-vitals", "next/typescript"),
14 | ];
15 |
16 | export default eslintConfig;
17 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/components/FocusInput.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import FocusInput from './FocusInput';
3 | import {render, fireEvent, cleanup, screen} from '@testing-library/react';
4 |
5 | afterEach(cleanup);
6 |
7 | test('clicking on button trigger focus on input', () => {
8 | render()
9 | fireEvent.click(screen.getByText('Click to Focus'))
10 |
11 | expect(document.activeElement).toBe(screen.getByPlaceholderText("Focus me!"))
12 | });
13 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { dirname } from "path";
2 | import { fileURLToPath } from "url";
3 | import { FlatCompat } from "@eslint/eslintrc";
4 |
5 | const __filename = fileURLToPath(import.meta.url);
6 | const __dirname = dirname(__filename);
7 |
8 | const compat = new FlatCompat({
9 | baseDirectory: __dirname,
10 | });
11 |
12 | const eslintConfig = [
13 | ...compat.extends("next/core-web-vitals", "next/typescript"),
14 | ];
15 |
16 | export default eslintConfig;
17 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/components/FocusInput.js:
--------------------------------------------------------------------------------
1 | import React, {useRef} from 'react';
2 |
3 | const FocusInput = () => {
4 | const inputRef = useRef(null);
5 | return (
6 |
7 |
13 |
14 |
15 | );
16 | };
17 |
18 | export default FocusInput;
19 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/src/components/Hero.tsx:
--------------------------------------------------------------------------------
1 | import { Flex, Heading } from "@chakra-ui/react";
2 |
3 | export const Hero = ({ title }: { title: string }) => (
4 |
11 | {title}
12 |
13 | );
14 |
15 | Hero.defaultProps = {
16 | title: "with-chakra-ui-typescript",
17 | };
18 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/calculator-test-jest/coverage/lcov.info:
--------------------------------------------------------------------------------
1 | TN:
2 | SF:calculator.js
3 | FN:1,(anonymous_0)
4 | FN:5,(anonymous_1)
5 | FN:9,(anonymous_2)
6 | FN:13,(anonymous_3)
7 | FNF:4
8 | FNH:4
9 | FNDA:2,(anonymous_0)
10 | FNDA:2,(anonymous_1)
11 | FNDA:2,(anonymous_2)
12 | FNDA:3,(anonymous_3)
13 | DA:1,1
14 | DA:2,2
15 | DA:5,1
16 | DA:6,2
17 | DA:9,1
18 | DA:10,2
19 | DA:13,1
20 | DA:14,3
21 | DA:15,1
22 | DA:17,2
23 | DA:20,1
24 | LF:11
25 | LH:11
26 | BRDA:14,0,0,1
27 | BRDA:14,0,1,2
28 | BRF:2
29 | BRH:2
30 | end_of_record
31 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/app/api/tasks/route.ts:
--------------------------------------------------------------------------------
1 | import tasks from '@/mocks/tasks.json';
2 |
3 | const getRandomTasks = (limit = 10) => {
4 | return tasks.sort(() => Math.random() - 0.5).slice(0, limit);
5 | };
6 |
7 | export async function GET() {
8 | // const limit = request.nextUrl.searchParams.get('limit');
9 | // const status = request.nextUrl.searchParams.get('status');
10 |
11 | return new Response(JSON.stringify(getRandomTasks(12)), {
12 | status: 200,
13 | headers: { 'Content-Type': 'application/json' },
14 | });
15 | }
16 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/src/Copyright.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import Typography from '@mui/material/Typography';
3 | import MuiLink from '@mui/material/Link';
4 |
5 | export default function Copyright() {
6 | return (
7 |
8 | {'Copyright © '}
9 |
10 | Your Website
11 | {' '}
12 | {new Date().getFullYear()}.
13 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/src/components/Copyright.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import Typography from '@mui/material/Typography';
3 | import MuiLink from '@mui/material/Link';
4 |
5 | export default function Copyright() {
6 | return (
7 |
8 | {'Copyright © '}
9 |
10 | Your Website
11 | {' '}
12 | {new Date().getFullYear()}.
13 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/lectures/13-environment-and-preprocessors/practice/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "arg-laba",
3 | "version": "1.0.1",
4 | "description": "test npm init",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "sass:build": "sass styles.scss styles.css",
9 | "sass:watch": "sass styles.scss styles.css --watch"
10 | },
11 | "keywords": [
12 | "laba",
13 | "study"
14 | ],
15 | "author": "Mike",
16 | "license": "ISC",
17 | "dependencies": {
18 | "sass": "^1.54.3"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lectures/07-js-basics-2/task.md:
--------------------------------------------------------------------------------
1 | # JS basic 2 practice
2 |
3 | Your task is to complete all of codewars katas.
4 |
5 | ### Definition of done
6 |
7 | - All task tests are passed
8 | - Your PR includes one js file with all of your solutions
9 |
10 | Example of file structure:
11 |
12 | ```
13 | // task 1 link
14 | solution() {
15 | ...
16 | }
17 |
18 | // task 2 link
19 | solution() {
20 | ...
21 | }
22 |
23 | ...
24 | ```
25 |
26 | [List is here](https://docs.google.com/document/d/1-a743qOYHvs7UPTM7ltDIlx_VvJX1C3rym4swDI7zRo/edit?usp=sharing), good luck.
27 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/script/5-classes.js:
--------------------------------------------------------------------------------
1 | // const userData = document.querySelector('.user-data');
2 |
3 | // console.log(userData.className);
4 | // console.log(userData.classList.add('test-1'));
5 | // console.log(userData.classList.remove('test-1'));
6 | // console.log(userData.classList.toggle('test-1'));
7 | // console.log(userData.classList.contains('test-1'));
8 |
9 | // userData.style.color = 'red';
10 | // userData.style.marginTop = '20px';
11 | // console.log(userData.style.marginTop);
12 | // console.log(getComputedStyle(userData).margin);
13 |
--------------------------------------------------------------------------------
/lectures/04-css/practice/z-index/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Document
10 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 |
27 | # local env files
28 | .env*.local
29 |
30 | # vercel
31 | .vercel
32 |
33 | # typescript
34 | *.tsbuildinfo
35 | next-env.d.ts
36 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/src/pages/_document.tsx:
--------------------------------------------------------------------------------
1 | import NextDocument, { Html, Head, Main, NextScript } from "next/document";
2 | import { ColorModeScript } from "@chakra-ui/react";
3 |
4 | export default class Document extends NextDocument {
5 | render() {
6 | return (
7 |
8 |
9 |
10 | {/* Make Color mode to persists when you refresh the page. */}
11 |
12 |
13 |
14 |
15 |
16 | );
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lectures/06-js-basics-1/task.md:
--------------------------------------------------------------------------------
1 | # JS basic practice
2 |
3 | Your task is to complete all of codewars katas.
4 |
5 | ### Definition of done
6 |
7 | - All task tests are passed
8 | - Your PR includes one js file with all of your solutions
9 |
10 | Example of file structure:
11 |
12 | ```
13 | // task 1 link
14 | solution() {
15 | ...
16 | }
17 |
18 | // task 2 link
19 | solution() {
20 | ...
21 | }
22 |
23 | ...
24 | ```
25 |
26 | [List is here](https://solvdportal.sharepoint.com/:w:/s/GoogleDriveSolvdLABA/EWDFXpCRMdZMuHWQSPLNEyYBjLGJl7XCFlZap_np_pwQwQ?e=G1r2Yv), good luck.
27 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 |
27 | # local env files
28 | .env*.local
29 |
30 | # vercel
31 | .vercel
32 |
33 | # typescript
34 | *.tsbuildinfo
35 | next-env.d.ts
36 |
--------------------------------------------------------------------------------
/lectures/16-typescript-advanced/code_examples/7-keyof.ts:
--------------------------------------------------------------------------------
1 | interface Person {
2 | name: string;
3 | age: number;
4 | }
5 | type KeyType = keyof Person; // also works
6 |
7 | type NewObj = Record
8 |
9 | const newObj: Partial = {
10 | name: 10,
11 | age: 100,
12 | country: 19,
13 | }
14 |
15 | const printPersonProp = (person, property: keyof Person) => {
16 | console.log(`Person prop: ${person[property]}`);
17 | };
18 |
19 | const person: Person = {
20 | name: 'Ilya',
21 | age: 23,
22 | };
23 |
24 | printPersonProp(person, 'country');
25 |
26 | export {};
27 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/app/StoreProvider.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 | import { useRef } from 'react';
3 | import { Provider } from 'react-redux';
4 | import { makeStore, AppStore } from '../../lib/store';
5 |
6 | export default function StoreProvider({ children }: { children: React.ReactNode }) {
7 | const storeRef = useRef(undefined);
8 |
9 | if (!storeRef.current) {
10 | // Create the store instance the first time this renders
11 | storeRef.current = makeStore();
12 | }
13 |
14 | return {children};
15 | }
16 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/creational/4.singleton.js:
--------------------------------------------------------------------------------
1 | class Singleton {
2 | static instance;
3 |
4 | constructor() {
5 | if (Singleton.instance) {
6 | return Singleton.instance;
7 | }
8 | this.counter = 0;
9 | Singleton.instance = this;
10 | }
11 |
12 | increaseCounter() {
13 | this.counter += 1;
14 | }
15 | }
16 |
17 | const instance1 = new Singleton();
18 | instance1.increaseCounter();
19 | instance1.increaseCounter();
20 | instance1.increaseCounter();
21 |
22 | const instance2 = new Singleton();
23 |
24 | console.log(instance1);
25 | console.log(instance2);
26 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 | .pnpm-debug.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | # next-env.d.ts
37 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/styles/sizing.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | padding: 0;
4 | margin: 0;
5 | }
6 |
7 | body {
8 | box-sizing: border-box;
9 | height: 500vh;
10 | }
11 |
12 | main {
13 | min-height: 100vh;
14 | display: flex;
15 | justify-content: center;
16 | align-items: center;
17 | }
18 |
19 | .box {
20 | width: 500px;
21 | height: 500px;
22 | background: red;
23 | padding: 40px;
24 | border: 20px solid green;
25 | overflow: auto;
26 | }
27 |
28 | .box__content {
29 | height: 1400px;
30 | width: 100%;
31 | background: blue;
32 | }
33 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-ant-design-app/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-react-bootstrap-app/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 | next-env.d.ts
37 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": false,
8 | "forceConsistentCasingInFileNames": true,
9 | "noEmit": true,
10 | "esModuleInterop": true,
11 | "module": "esnext",
12 | "moduleResolution": "node",
13 | "resolveJsonModule": true,
14 | "isolatedModules": true,
15 | "jsx": "preserve"
16 | },
17 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
18 | "exclude": ["node_modules"]
19 | }
20 |
--------------------------------------------------------------------------------
/lectures/04-css/practice/flexbox/styles.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 |
5 | .container {
6 | max-width: 1080px;
7 | margin: 0 auto;
8 | }
9 |
10 | .flex-container {
11 | display: flex;
12 | flex-wrap: wrap;
13 | gap: 40px;
14 | }
15 |
16 | .flex-item {
17 | width: calc(25% - 30px);
18 | background: red;
19 | }
20 |
21 | @media (max-width: 1080px) {
22 | .container {
23 | max-width: 768px;
24 | }
25 | }
26 |
27 | @media (max-width: 768px) {
28 | .flex-item {
29 | width: calc(50% - 20px);
30 | }
31 | }
32 |
33 | @media (max-width: 425px) {
34 | .flex-item {
35 | width: 100%;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lectures/13-environment-and-preprocessors/practice/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
9 |
10 |
11 |
12 |
13 |
Hello guys!
14 |
099 226 99 89
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/app/react-csr-approach/page.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 |
3 | import { useEffect, useState } from 'react';
4 |
5 | import Tasks from '@/components/Tasks';
6 | import { Task } from '@/interfaces/task';
7 |
8 | export default function ReactApproach() {
9 | const [tasks, setTasks] = useState([]);
10 |
11 | useEffect(() => {
12 | fetch('/api/tasks')
13 | .then((res) => res.json())
14 | .then((data) => setTasks(data));
15 | }, []);
16 |
17 | return (
18 |
19 |
20 | Tasks
21 |
22 |
23 |
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/app/StoreProvider.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 | import type * as React from 'react';
3 | import { QueryClientProvider } from '@tanstack/react-query';
4 | import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
5 | import { getQueryClient } from '@/app/get-query-client';
6 |
7 | export default function Providers({ children }: { children: React.ReactNode }) {
8 | const queryClient = getQueryClient();
9 |
10 | return (
11 |
12 | {children}
13 |
14 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/src/components/DarkModeSwitch.tsx:
--------------------------------------------------------------------------------
1 | import { useColorMode, IconButton } from "@chakra-ui/react";
2 | import { SunIcon, MoonIcon } from "@chakra-ui/icons";
3 |
4 | export const DarkModeSwitch = () => {
5 | const { colorMode, toggleColorMode } = useColorMode();
6 | const isDark = colorMode === "dark";
7 | return (
8 | : }
13 | aria-label="Toggle Theme"
14 | colorScheme="green"
15 | onClick={toggleColorMode}
16 | />
17 | );
18 | };
19 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-2/mouse-events/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
9 |
10 |
11 |
12 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/components/Tasks/styles.module.css:
--------------------------------------------------------------------------------
1 | .tasksContainer {
2 | display: flex;
3 | flex-wrap: wrap;
4 | padding: 10px;
5 | background-color: #f0f0f0;
6 | gap: 15px;
7 | }
8 |
9 | .taskItem {
10 | display: flex;
11 | flex-direction: column;
12 | gap: 10px;
13 | width: calc(33.33333% - 10px);
14 | padding: 10px;
15 | border-radius: 10px;
16 | box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
17 | }
18 |
19 | .taskItem:hover {
20 | transform: scale(1.05);
21 | transition: transform 0.3s ease-in-out;
22 | }
23 |
24 | .taskLink {
25 | display: block;
26 | text-decoration: none;
27 | color: inherit;
28 | }
29 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/store/store.js:
--------------------------------------------------------------------------------
1 | import { createStore, applyMiddleware } from 'redux';
2 | import thunk from 'redux-thunk';
3 | import { createWrapper } from 'next-redux-wrapper';
4 |
5 | import rootReducer from './reducers/rootReducer';
6 |
7 | const initialState = {
8 | orders: {
9 | result: [],
10 | isLoading: false,
11 | error: null,
12 | page: 0,
13 | },
14 | selectedOrders: [],
15 | };
16 |
17 | export const store = createStore(
18 | rootReducer,
19 | initialState,
20 | applyMiddleware(...[thunk])
21 | );
22 |
23 | export const wrapper = createWrapper(() => store, { debug: true });
24 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-ant-design-app/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "forceConsistentCasingInFileNames": true,
9 | "noEmit": true,
10 | "esModuleInterop": true,
11 | "module": "esnext",
12 | "moduleResolution": "node",
13 | "resolveJsonModule": true,
14 | "isolatedModules": true,
15 | "jsx": "preserve",
16 | "incremental": true
17 | },
18 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
19 | "exclude": ["node_modules"]
20 | }
21 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/components/ChangeInput.js:
--------------------------------------------------------------------------------
1 | import React, {useState} from 'react';
2 |
3 | function ChangeInput() {
4 | const [name, setName] = useState('');
5 | return (
6 |
7 |
8 | Welcome, {name === '' ? 'Anonymous User' : name}!
9 |
10 |
11 | setName(e.target.value)}
17 | />
18 |
19 | );
20 | }
21 |
22 | export default ChangeInput;
23 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/sizing.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Sizing
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/task.md:
--------------------------------------------------------------------------------
1 | # JS DOM
2 |
3 | ## Description
4 |
5 | We need to create a grid with 20 cols and 30 rows. Any cell can be selected by clicking on it
6 |
7 | ## Definition of done
8 |
9 | - Cell’s size should be 40x40px;
10 | - Selected cell should be highlighted with blue color.
11 | - By default cells are empty. But selected cell should contain a value like x/y, where x is column number, y - row number
12 | - Active row and column should be highlighted with light blue color
13 | - Click handler should be implemented using Event Delegation approach
14 |
15 | ## Advanced
16 |
17 | - clicking with holding shift button allows to select several items
18 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "practice",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev --turbopack",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "react": "^19.0.0",
13 | "react-dom": "^19.0.0",
14 | "next": "15.3.3"
15 | },
16 | "devDependencies": {
17 | "typescript": "^5",
18 | "@types/node": "^20",
19 | "@types/react": "^19",
20 | "@types/react-dom": "^19",
21 | "eslint": "^9",
22 | "eslint-config-next": "15.3.3",
23 | "@eslint/eslintrc": "^3"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | const root = ReactDOM.createRoot(document.getElementById('root'));
8 | root.render(
9 |
10 |
11 | ,
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 |
27 | # local env files
28 | .env.local
29 | .env.development.local
30 | .env.test.local
31 | .env.production.local
32 |
33 | # vercel
34 | .vercel
35 |
36 | # typescript
37 | *.tsbuildinfo
38 | next-env.d.ts
39 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/events.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Document
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/script/4-modifying.js:
--------------------------------------------------------------------------------
1 | // const userData = document.querySelector('.user-data');
2 | // const cityInfo = document.createElement('p');
3 | // cityInfo.textContent = 'London';
4 |
5 | // userData.prepend(cityInfo);
6 | // userData.append(cityInfo);
7 | // userData.before(cityInfo);
8 | // userData.after(cityInfo);
9 | // userData.replaceWith(cityInfo);
10 | // userData.remove();
11 |
12 | // userData.insertAdjacentElement('beforebegin', cityInfo);
13 | // userData.insertAdjacentElement('afterbegin', cityInfo);
14 | // userData.insertAdjacentElement('afterend', cityInfo);
15 | // userData.insertAdjacentElement('beforeend', cityInfo);
16 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/events/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Document
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lectures/15-typescript-basics/code_examples/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ts-basics",
3 | "version": "1.0.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "ts-basics",
9 | "version": "1.0.0",
10 | "license": "MIT",
11 | "dependencies": {
12 | "typescript": "^5.3.3"
13 | }
14 | },
15 | "node_modules/typescript": {
16 | "version": "5.3.3",
17 | "license": "Apache-2.0",
18 | "bin": {
19 | "tsc": "bin/tsc",
20 | "tsserver": "bin/tsserver"
21 | },
22 | "engines": {
23 | "node": ">=14.17"
24 | }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/components/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import * as serviceWorker from './serviceWorker';
6 | import ReactGA from 'react-ga';
7 |
8 | ReactGA.initialize('UA-64315802-4');
9 | ReactGA.pageview('/');
10 |
11 | ReactDOM.render(, document.getElementById('root'));
12 |
13 | // If you want your app to work offline and load faster, you can change
14 | // unregister() to register() below. Note this comes with some pitfalls.
15 | // Learn more about service workers: https://bit.ly/CRA-PWA
16 | serviceWorker.unregister();
17 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-ant-design-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "next",
5 | "build": "next build",
6 | "start": "next start"
7 | },
8 | "dependencies": {
9 | "@ant-design/cssinjs": ">=1.21.0",
10 | "@ant-design/icons": "^5.1.4",
11 | "antd": "^5.0.0",
12 | "next": "latest",
13 | "react": "18.2.0",
14 | "react-dom": "18.2.0"
15 | },
16 | "devDependencies": {
17 | "@types/node": "^20.4.5",
18 | "@types/react": "^18.2.17",
19 | "@types/react-dom": "^18.2.7",
20 | "typescript": "^5.1.6"
21 | },
22 | "browser": {
23 | "fs": false,
24 | "path": false
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lectures/15-typescript-basics/code_examples/2-array-types.ts:
--------------------------------------------------------------------------------
1 | const hobbies = ['Cooking', 'Sport']; // automatically defined type "string[]"
2 |
3 | const typedHobbies: string[] = ['Cooking', 'Sports', ""];
4 |
5 | const anotherArr: [string, number, boolean] = ["another one", 10, true]
6 |
7 | const array: [string, number, boolean] = [...anotherArr]
8 |
9 | // ||
10 |
11 |
12 | // union
13 | const unionType = [2, 'test', 213, 123, 'test2', true]; // the same
14 | const unionType2: (string | number)[] = [1, 'test', 213, 123, 'test2', true]; // the same
15 |
16 | // tuple
17 | const tupleType: [string, number] = ['123', 123]; // should be exactly two values which defined in type
18 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/store/actions/ordersAction.js:
--------------------------------------------------------------------------------
1 | export const SETUP_ORDERS = 'SETUP_ORDERS';
2 | export const SETUP_ORDERS_SUCCESS = 'SETUP_ORDERS_SUCCESS';
3 | export const SETUP_ORDERS_FAILURE = 'SETUP_ORDERS_FAILURE';
4 |
5 | export const getOrders = (page) => {
6 | return (dispatch) => {
7 | dispatch({ type: SETUP_ORDERS });
8 |
9 | return fetch(`api/orders?page=${page}`)
10 | .then((res) => res.json())
11 | .then((orders) =>
12 | dispatch({ type: SETUP_ORDERS_SUCCESS, payload: { orders } })
13 | )
14 | .catch((e) =>
15 | dispatch({ type: SETUP_ORDERS_FAILURE, payload: { error: e.message } })
16 | );
17 | };
18 | };
19 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/App.js:
--------------------------------------------------------------------------------
1 | import logo from './logo.svg';
2 | import './App.css';
3 |
4 | function App() {
5 | return (
6 |
22 | );
23 | }
24 |
25 | export default App;
26 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/README.md:
--------------------------------------------------------------------------------
1 | # UI Libraries
2 |
3 | - [Video](https://solvdportal-my.sharepoint.com/:v:/r/personal/laba_solvd_com/Documents/Recordings/Development-React.js-2025-01-20250620_140246-Meeting%20Recording.mp4?csf=1&web=1&e=VKcW32&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D)
4 | - [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/Eea4KuPEpdhJqSZpHhZSsxkBlnwTmePbCh7NV-t3SjZ6hw?e=MdDKn4)
5 |
6 | MUI docs - https://mui.com/
7 |
8 | Ant Design dcs - https://ant.design/
9 |
10 | Chakra UI docs - https://chakra-ui.com/
11 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "forceConsistentCasingInFileNames": true,
9 | "noEmit": true,
10 | "esModuleInterop": true,
11 | "module": "esnext",
12 | "moduleResolution": "node",
13 | "resolveJsonModule": true,
14 | "isolatedModules": true,
15 | "jsx": "preserve",
16 | "jsxImportSource": "@emotion/react",
17 | "incremental": true
18 | },
19 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
20 | "exclude": ["node_modules"]
21 | }
22 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 | /.pnp
6 | .pnp.*
7 | .yarn/*
8 | !.yarn/patches
9 | !.yarn/plugins
10 | !.yarn/releases
11 | !.yarn/versions
12 |
13 | # testing
14 | /coverage
15 |
16 | # next.js
17 | /.next/
18 | /out/
19 |
20 | # production
21 | /build
22 |
23 | # misc
24 | .DS_Store
25 | *.pem
26 |
27 | # debug
28 | npm-debug.log*
29 | yarn-debug.log*
30 | yarn-error.log*
31 | .pnpm-debug.log*
32 |
33 | # env files (can opt-in for committing if needed)
34 | .env*
35 |
36 | # vercel
37 | .vercel
38 |
39 | # typescript
40 | *.tsbuildinfo
41 | next-env.d.ts
42 |
43 | .next
44 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.*
7 | .yarn/*
8 | !.yarn/patches
9 | !.yarn/plugins
10 | !.yarn/releases
11 | !.yarn/versions
12 |
13 | # testing
14 | /coverage
15 |
16 | # next.js
17 | /.next/
18 | /out/
19 |
20 | # production
21 | /build
22 |
23 | # misc
24 | .DS_Store
25 | *.pem
26 |
27 | # debug
28 | npm-debug.log*
29 | yarn-debug.log*
30 | yarn-error.log*
31 | .pnpm-debug.log*
32 |
33 | # env files (can opt-in for committing if needed)
34 | .env*
35 |
36 | # vercel
37 | .vercel
38 |
39 | # typescript
40 | *.tsbuildinfo
41 | next-env.d.ts
42 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/example-1/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/lectures/24-next-js-3/README.md:
--------------------------------------------------------------------------------
1 | # Next.js. App Router.
2 |
3 | Here's you can find materials about "Next.js. App Router."
4 |
5 | [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/EcmxvHoR6rdEvQ8JQuwnk3UBEsu66cNhlR-O07U9ZON2-Q?e=SJwUNd)
6 |
7 | [Video](https://solvdportal-my.sharepoint.com/personal/laba_solvd_com/_layouts/15/stream.aspx?id=%2Fpersonal%2Flaba%5Fsolvd%5Fcom%2FDocuments%2FRecordings%2FDevelopment%2DReact%2Ejs%2D2025%2D01%2D20250610%5F150232%2DMeeting%20Recording%2Emp4&referrer=StreamWebApp%2EWeb&referrerScenario=AddressBarCopied%2Eview%2Ebeda0e39%2D8554%2D480a%2Dbacd%2D2e860acd08b2&isDarkMode=true)
8 |
9 | Useful links
10 |
11 | - [App Router](https://nextjs.org/docs)
12 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.*
7 | .yarn/*
8 | !.yarn/patches
9 | !.yarn/plugins
10 | !.yarn/releases
11 | !.yarn/versions
12 |
13 | # testing
14 | /coverage
15 |
16 | # next.js
17 | /.next/
18 | /out/
19 |
20 | # production
21 | /build
22 |
23 | # misc
24 | .DS_Store
25 | *.pem
26 |
27 | # debug
28 | npm-debug.log*
29 | yarn-debug.log*
30 | yarn-error.log*
31 | .pnpm-debug.log*
32 |
33 | # env files (can opt-in for committing if needed)
34 | .env*
35 |
36 | # vercel
37 | .vercel
38 |
39 | # typescript
40 | *.tsbuildinfo
41 | next-env.d.ts
42 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/store/slices/counter.ts:
--------------------------------------------------------------------------------
1 | import { createSlice } from '@reduxjs/toolkit';
2 |
3 | export interface CounterState {
4 | value: number;
5 | }
6 |
7 | const initialState: CounterState = {
8 | value: 0,
9 | };
10 |
11 | export const counterSlice = createSlice({
12 | name: 'counter',
13 | initialState,
14 | reducers: {
15 | increment: (state) => {
16 | state.value += 1;
17 | },
18 | decrement: (state) => {
19 | state.value -= 1;
20 | },
21 | },
22 | });
23 |
24 | // Action creators are generated for each case reducer function
25 | export const { increment, decrement } = counterSlice.actions;
26 |
27 | export default counterSlice.reducer;
28 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.*
7 | .yarn/*
8 | !.yarn/patches
9 | !.yarn/plugins
10 | !.yarn/releases
11 | !.yarn/versions
12 |
13 | # testing
14 | /coverage
15 |
16 | # next.js
17 | /.next/
18 | /out/
19 |
20 | # production
21 | /build
22 |
23 | # misc
24 | .DS_Store
25 | *.pem
26 |
27 | # debug
28 | npm-debug.log*
29 | yarn-debug.log*
30 | yarn-error.log*
31 | .pnpm-debug.log*
32 |
33 | # env files (can opt-in for committing if needed)
34 | .env*
35 |
36 | # vercel
37 | .vercel
38 |
39 | # typescript
40 | *.tsbuildinfo
41 | next-env.d.ts
42 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "next",
5 | "build": "next build",
6 | "start": "next start"
7 | },
8 | "dependencies": {
9 | "@chakra-ui/icons": "^2.0.2",
10 | "@chakra-ui/react": "^2.2.1",
11 | "@chakra-ui/theme-tools": "^2.0.2",
12 | "@emotion/react": "^11.9.0",
13 | "@emotion/styled": "^11.9.0",
14 | "framer-motion": "^6.3.0",
15 | "next": "latest",
16 | "react": "^18.2.0",
17 | "react-dom": "^18.2.0"
18 | },
19 | "devDependencies": {
20 | "@types/node": "^18.0.0",
21 | "@types/react": "^18.0.0",
22 | "@types/react-dom": "^18.0.0",
23 | "typescript": "^4.7.2"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/calculator-test-jest/coverage/lcov-report/prettify.css:
--------------------------------------------------------------------------------
1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
2 |
--------------------------------------------------------------------------------
/lectures/16-typescript-advanced/code_examples/2-enums.ts:
--------------------------------------------------------------------------------
1 | enum Role { // automatically set numbers
2 | ADMIN = 'ADMIN',
3 | READ_ONLY = 'READ_ONLY',
4 | AUTHOR = 'AUTHOR',
5 | }
6 |
7 | enum RoleDuplicated { // we can set numbers on our own
8 | ADMIN = 10, // 0
9 | READ_ONLY = 20, // 1
10 | AUTHOR = 30, // 2
11 | }
12 |
13 | type PersonType = {
14 | name: string;
15 | age: number;
16 | hobbies: string[];
17 | role: Role;
18 | roleCustom: RoleDuplicated;
19 | };
20 |
21 | const personInstance: PersonType = {
22 | name: 'Ilya',
23 | age: 22,
24 | hobbies: ['Cooking', 'Sports'],
25 | role: Role.ADMIN,
26 | roleCustom: RoleDuplicated.ADMIN,
27 | };
28 |
29 | console.log('personInstance', personInstance);
30 |
31 | export {};
32 |
--------------------------------------------------------------------------------
/lectures/10-js-advanced-3/practice/modules/main.js:
--------------------------------------------------------------------------------
1 | import { add, subtract, PI } from './math.js';
2 | import User from './user.js';
3 | import * as Helpers from './helpers.js';
4 | import multiply from './math.js'; // Import default export directly
5 | import { multiply as reExportedMultiply } from './helpers.js'; // Import re-exported default export
6 |
7 | console.log(add(5, 3)); // 8
8 | console.log(subtract(5, 3)); // 2
9 | console.log(PI); // 3.14159
10 |
11 | const user = new User('John');
12 | console.log(user.greet()); // Hello, John!
13 |
14 | console.log(Helpers.add(10, 20)); // 30
15 | console.log(new Helpers.User('Jane').greet()); // Hello, Jane!
16 |
17 | console.log(multiply(2, 3)); // 6
18 | console.log(reExportedMultiply(4, 5)); // 20
19 |
--------------------------------------------------------------------------------
/lectures/04-css/practice/z-index/styles.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 |
5 | .box {
6 | width: 300px;
7 | height: 300px;
8 | background: red;
9 | }
10 |
11 | .index-outer {
12 | position: relative;
13 | }
14 |
15 | .index-inner {
16 | position: absolute;
17 | }
18 |
19 | .index-inner:nth-of-type(1) {
20 | background: yellow;
21 | top: 20px;
22 | left: 20px;
23 | }
24 |
25 | .index-inner:nth-of-type(2) {
26 | background: purple;
27 | top: 40px;
28 | left: 40px;
29 | z-index: 11;
30 | }
31 |
32 | .index-inner:nth-of-type(3) {
33 | background: pink;
34 | top: 60px;
35 | left: 60px;
36 | }
37 |
38 | .inner-outer-2 {
39 | background: blue;
40 | position: relative;
41 | z-index: 10;
42 | top: -20px;
43 | left: 10px;
44 | }
45 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2017",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "noEmit": true,
9 | "esModuleInterop": true,
10 | "module": "esnext",
11 | "moduleResolution": "bundler",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "jsx": "preserve",
15 | "incremental": true,
16 | "plugins": [
17 | {
18 | "name": "next"
19 | }
20 | ],
21 | "paths": {
22 | "@/*": ["./src/*"]
23 | }
24 | },
25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26 | "exclude": ["node_modules"]
27 | }
28 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/pages/test.tsx:
--------------------------------------------------------------------------------
1 | import { useTheme } from "@emotion/react";
2 | import { Box, Typography } from "@mui/material";
3 |
4 | const TestPage = () => {
5 | const theme = useTheme();
6 |
7 | return (
8 | <>
9 |
18 | Test
19 |
20 |
28 | QWERTY
29 |
30 | >
31 | );
32 | };
33 |
34 | export default TestPage;
35 |
--------------------------------------------------------------------------------
/lectures/04-css/task.md:
--------------------------------------------------------------------------------
1 | # CSS practice
2 |
3 | Create HTML page using provided [Figma Design]().
4 |
5 | ### Definition of done
6 |
7 | - The HTML and CSS should pass W3C [HTML](https://validator.w3.org/#validate_by_uri) and [CSS](https://jigsaw.w3.org/css-validator/) validations
8 | - The page structure should be semantically correct and includes most of HTML5 elements (header, nav, section, main and footer)
9 | - Page should look good on modern browsers (Chrome, Firefox) on desktop screens.
10 | - You should use [BEM approach](https://en.bem.info/methodology/quick-start/)
11 |
12 | ### Optional (advanced)
13 |
14 | - Implement dark mode functionality
15 |
16 | Good luck!
17 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2017",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "noEmit": true,
9 | "esModuleInterop": true,
10 | "module": "esnext",
11 | "moduleResolution": "bundler",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "jsx": "preserve",
15 | "incremental": true,
16 | "plugins": [
17 | {
18 | "name": "next"
19 | }
20 | ],
21 | "paths": {
22 | "@/*": ["./src/*"]
23 | }
24 | },
25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26 | "exclude": ["node_modules"]
27 | }
28 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/components/Tasks/index.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 |
3 | import Link from 'next/link';
4 |
5 | import { Task } from '@/interfaces/task';
6 |
7 | import styles from './styles.module.css';
8 |
9 | interface Props {
10 | tasks: Task[];
11 | }
12 |
13 | const Tasks = ({ tasks }: Props) => {
14 | return (
15 |
16 | {tasks.map((task) => (
17 | -
18 |
19 |
{task.title}
20 | {task.description}
21 | {task.status}
22 | {task.date}
23 |
24 |
25 | ))}
26 |
27 | );
28 | };
29 |
30 | export default Tasks;
31 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2017",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "noEmit": true,
9 | "esModuleInterop": true,
10 | "module": "esnext",
11 | "moduleResolution": "bundler",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "jsx": "preserve",
15 | "incremental": true,
16 | "plugins": [
17 | {
18 | "name": "next"
19 | }
20 | ],
21 | "paths": {
22 | "@/*": ["./src/*"]
23 | }
24 | },
25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26 | "exclude": ["node_modules"]
27 | }
28 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/components/ChangeInput.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ChangeInput from './ChangeInput';
3 | import {render, fireEvent, cleanup, screen} from '@testing-library/react';
4 |
5 | afterEach(cleanup);
6 |
7 | test('displays the correct greeting', () => {
8 | render()
9 |
10 | const input = screen.getByLabelText("user-name")
11 | const greeting = screen.getByTestId("change-input-greeting")
12 |
13 | expect(input.value).toBe('');
14 | expect(greeting.textContent).toBe("Welcome, Anonymous User!")
15 |
16 | fireEvent.change(input, {target: { value: "Vlad" }})
17 | expect(input.value).toBe('Vlad');
18 | expect(greeting.textContent).toBe("Welcome, Vlad!")
19 | });
20 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2017",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "noEmit": true,
9 | "esModuleInterop": true,
10 | "module": "esnext",
11 | "moduleResolution": "bundler",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "jsx": "preserve",
15 | "incremental": true,
16 | "plugins": [
17 | {
18 | "name": "next"
19 | }
20 | ],
21 | "paths": {
22 | "@/*": ["./src/*"]
23 | }
24 | },
25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26 | "exclude": ["node_modules"]
27 | }
28 |
--------------------------------------------------------------------------------
/lectures/05-css-advanced/task.md:
--------------------------------------------------------------------------------
1 | # CSS Advanced practice
2 |
3 | You need adjust our CV using CSS advanced features and BEM [Figma Design]().
4 |
5 | ### Definition of done
6 |
7 | - Should be used [BEM](https://en.bem.info/methodology/quick-start/) approach for CSS classes
8 | - Layout should be responsive and have a good look on mobile/tablet screens as well
9 | - Mobile layout should be on screens width up to 600px, tablet - up to 1024px
10 | - Should be added fixed button “scroll to top” on mobile view to the bottom of the page
11 | - It would be great if you can add three types of animations to your page(transition, keyframe, js). You can add them where you imagine it.
12 |
13 | Good luck!
14 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/structural/2.decorator.js:
--------------------------------------------------------------------------------
1 | class Server {
2 | constructor(ip, port) {
3 | this.ip = ip;
4 | this.port = port;
5 | }
6 |
7 | get url() {
8 | return `https://${this.ip}:${this.port}`;
9 | }
10 | }
11 |
12 | // decorator
13 | function aws(server) {
14 | server.isAWS = true;
15 | server.awsInfo = function () {
16 | return server.url;
17 | };
18 | return server;
19 | }
20 |
21 | // decorator
22 | function azure(server) {
23 | server.isAzure = true;
24 | server.port += 500;
25 | return server;
26 | }
27 |
28 | const s1 = aws(new Server('12.32.33.9', 8080));
29 | console.log(s1.isAWS);
30 | console.log(s1.awsInfo());
31 |
32 | const s2 = azure(new Server('2.1.1.10', 1000));
33 | console.log(s2.isAzure);
34 | console.log(s2.url);
35 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | height: 40vmin;
7 | pointer-events: none;
8 | }
9 |
10 | @media (prefers-reduced-motion: no-preference) {
11 | .App-logo {
12 | animation: App-logo-spin infinite 20s linear;
13 | }
14 | }
15 |
16 | .App-header {
17 | background-color: #282c34;
18 | min-height: 100vh;
19 | display: flex;
20 | flex-direction: column;
21 | align-items: center;
22 | justify-content: center;
23 | font-size: calc(10px + 2vmin);
24 | color: white;
25 | }
26 |
27 | .App-link {
28 | color: #61dafb;
29 | }
30 |
31 | @keyframes App-logo-spin {
32 | from {
33 | transform: rotate(0deg);
34 | }
35 | to {
36 | transform: rotate(360deg);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/src/theme.ts:
--------------------------------------------------------------------------------
1 | 'use client';
2 | import { Roboto } from 'next/font/google';
3 | import { createTheme } from '@mui/material/styles';
4 |
5 | const roboto = Roboto({
6 | weight: ['300', '400', '500', '700'],
7 | subsets: ['latin'],
8 | display: 'swap',
9 | });
10 |
11 | const theme = createTheme({
12 | palette: {
13 | mode: 'light',
14 | },
15 | typography: {
16 | fontFamily: roboto.style.fontFamily,
17 | },
18 | components: {
19 | MuiAlert: {
20 | styleOverrides: {
21 | root: ({ ownerState }) => ({
22 | ...(ownerState.severity === 'info' && {
23 | backgroundColor: '#60a5fa',
24 | }),
25 | }),
26 | },
27 | },
28 | },
29 | });
30 |
31 | export default theme;
32 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/app/fetch-api-approach-no-cache/page.tsx:
--------------------------------------------------------------------------------
1 | import { Task } from '@/interfaces/task';
2 | import Tasks from '@/components/Tasks';
3 |
4 | /**
5 | *
6 | * fetch responses are not cached by default.
7 | * However, Next.js will prerender the route and the output will be cached for improved performance.
8 | * If you'd like to opt into dynamic rendering, use the { cache: 'no-store' } option.
9 | */
10 | const FetchApiApproach = async () => {
11 | const tasks = await fetch('http://localhost:3001/api/tasks', {
12 | cache: 'no-store',
13 | });
14 | const data: Task[] = await tasks.json();
15 |
16 | return (
17 |
18 |
Tasks Without Cache
19 |
20 |
21 | );
22 | };
23 |
24 | export default FetchApiApproach;
25 |
--------------------------------------------------------------------------------
/lectures/03-html-basics/task.md:
--------------------------------------------------------------------------------
1 | # HTML practice
2 |
3 | Create HTML page using provided [Figma Design]().
4 |
5 | ### Definition of done
6 |
7 | - You can use only HTML (no CSS or JS or something else).
8 | - HTML should pass W3C [HTML](https://validator.w3.org/#validate_by_uri) validations. HTML should be semantic.
9 | - Add work navigation between pages.
10 | - Put your photo instead of "YOUR PHOTO HERE" on the template. Photo should not take all page.
11 | - Full name and phone inputs should be required values on the form. This means that you can't send a form without these values.
12 | - Don't be a Pixel Perfect. Don't be worry about it.
13 | - Don't need to send data anywhere. Just miss this.
14 |
15 | Good luck!
16 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Traffic Lights
8 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "client-next",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "@emotion/react": "^11.10.6",
13 | "@emotion/server": "^11.10.0",
14 | "@emotion/styled": "^11.10.6",
15 | "@mui/icons-material": "^5.11.16",
16 | "@mui/material": "^5.11.16",
17 | "eslint": "8.37.0",
18 | "eslint-config-next": "13.3.0",
19 | "next": "13.3.0",
20 | "next-redux-wrapper": "^8.1.0",
21 | "react": "18.2.0",
22 | "react-dom": "18.2.0",
23 | "react-redux": "^8.0.5",
24 | "redux": "^4.2.1",
25 | "redux-thunk": "^2.4.2"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lectures/19-react-ui/README.md:
--------------------------------------------------------------------------------
1 | # React UI. Managing State.
2 |
3 | Here's you can find materials about "React UI. Managing State."
4 |
5 | [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/EfGctQ3vI_dHpBv1rsoGSOQBRWAel4O5w8C1BX5AU-Cz9g?e=t29WrV)
6 |
7 | [Video](https://solvdportal-my.sharepoint.com/:v:/r/personal/laba_solvd_com/Documents/Recordings/Development-React.js-2025-01-20250523_140345-Meeting%20Recording.mp4?csf=1&web=1&e=jUsIHa&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D)
8 |
9 | Useful links
10 |
11 | - [Describing the UI](https://react.dev/learn/adding-interactivity)
12 | - [Managing State](https://react.dev/learn/choosing-the-state-structure)
13 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/store/reducers/orders.js:
--------------------------------------------------------------------------------
1 | import {
2 | SETUP_ORDERS,
3 | SETUP_ORDERS_SUCCESS,
4 | SETUP_ORDERS_FAILURE,
5 | } from '../actions/ordersAction';
6 |
7 | const orders = (state = {}, action) => {
8 | switch (action.type) {
9 | case 'SETUP_ORDERS':
10 | return {
11 | ...state,
12 | isLoading: true,
13 | };
14 | case 'SETUP_ORDERS_SUCCESS':
15 | return {
16 | ...state,
17 | isLoading: false,
18 | error: null,
19 | result: [...state.result, ...action.payload.orders],
20 | page: state.page + 1,
21 | };
22 | case 'SETUP_ORDERS_FAILURE':
23 | return {
24 | ...state,
25 | isLoading: false,
26 | error: action.payload.error,
27 | };
28 | default:
29 | return state;
30 | }
31 | };
32 |
33 | export default orders;
34 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/app/fetch-api-approach-cache/page.tsx:
--------------------------------------------------------------------------------
1 | import { Task } from '@/interfaces/task';
2 | import Tasks from '@/components/Tasks';
3 |
4 | /**
5 | *
6 | * fetch responses are not cached by default.
7 | * However, Next.js will prerender the route and the output will be cached for improved performance.
8 | * If you'd like to opt into dynamic rendering, use the { cache: 'no-store' } option.
9 | */
10 | const FetchApiApproach = async () => {
11 | const tasks = await fetch('http://localhost:3001/api/tasks', {
12 | // next: { revalidate: 60 }, // Revalidate every 60 seconds
13 | });
14 | const data: Task[] = await tasks.json();
15 |
16 | return (
17 |
18 |
Tasks With Cache
19 |
20 |
21 | );
22 | };
23 |
24 | export default FetchApiApproach;
25 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "forceConsistentCasingInFileNames": true,
9 | "noEmit": true,
10 | "esModuleInterop": true,
11 | "module": "esnext",
12 | "moduleResolution": "node",
13 | "resolveJsonModule": true,
14 | "isolatedModules": true,
15 | "jsx": "preserve",
16 | "incremental": true,
17 | "plugins": [
18 | {
19 | "name": "next"
20 | }
21 | ],
22 | "baseUrl": ".",
23 | "paths": {
24 | "@/*": ["./src/*"]
25 | }
26 | },
27 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
28 | "exclude": ["node_modules"]
29 | }
30 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-ant-design-app/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import type { Metadata } from "next";
3 | import { Inter } from "next/font/google";
4 | import StyledComponentsRegistry from "./AntdRegistry";
5 | import "./globals.css";
6 |
7 | const inter = Inter({ subsets: ["latin"] });
8 |
9 | export const metadata: Metadata = {
10 | title: "Create Next App",
11 | description: "Generated by create next app",
12 | };
13 |
14 | interface RootLayoutProps {
15 | children: React.ReactNode;
16 | }
17 |
18 | function RootLayout({ children }: RootLayoutProps) {
19 | return (
20 |
21 |
22 | {children}
23 |
24 |
25 | );
26 | }
27 |
28 | export default RootLayout;
29 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-ant-design-app/app/AntdRegistry.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import React from "react";
4 | import { useServerInsertedHTML } from "next/navigation";
5 | import { StyleProvider, createCache, extractStyle } from "@ant-design/cssinjs";
6 | import type Entity from "@ant-design/cssinjs/es/Cache";
7 |
8 | interface StyledRegistryProps {
9 | children: React.ReactNode;
10 | }
11 |
12 | const StyledComponentsRegistry = ({ children }: StyledRegistryProps) => {
13 | const cache = React.useMemo(() => createCache(), []);
14 | useServerInsertedHTML(() => (
15 |
19 | ));
20 | return {children};
21 | };
22 |
23 | export default StyledComponentsRegistry;
24 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/src/theme.tsx:
--------------------------------------------------------------------------------
1 | import { extendTheme } from "@chakra-ui/react";
2 |
3 | const fonts = { mono: `'Menlo', monospace` };
4 |
5 | const breakpoints = {
6 | sm: "40em",
7 | md: "52em",
8 | lg: "64em",
9 | xl: "80em",
10 | };
11 |
12 | const theme = extendTheme({
13 | semanticTokens: {
14 | colors: {
15 | text: {
16 | default: "#16161D",
17 | _dark: "#ade3b8",
18 | },
19 | heroGradientStart: {
20 | default: "#7928CA",
21 | _dark: "#e3a7f9",
22 | },
23 | heroGradientEnd: {
24 | default: "#FF0080",
25 | _dark: "#fbec8f",
26 | },
27 | },
28 | radii: {
29 | button: "12px",
30 | },
31 | },
32 | colors: {
33 | black: "#16161D",
34 | },
35 | fonts,
36 | breakpoints,
37 | });
38 |
39 | export default theme;
40 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "base-2025",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev --turbopack",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "@emotion/cache": "^11.14.0",
13 | "@emotion/styled": "^11.14.0",
14 | "@mui/icons-material": "^7.1.1",
15 | "@mui/material": "^7.1.1",
16 | "@mui/material-nextjs": "^7.1.1",
17 | "next": "15.3.3",
18 | "react": "^19.0.0",
19 | "react-dom": "^19.0.0"
20 | },
21 | "devDependencies": {
22 | "@eslint/eslintrc": "^3",
23 | "@types/node": "^20",
24 | "@types/react": "^19",
25 | "@types/react-dom": "^19",
26 | "eslint": "^9",
27 | "eslint-config-next": "15.3.3",
28 | "typescript": "^5"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import { AppRouterCacheProvider } from '@mui/material-nextjs/v14-appRouter';
3 | import { ThemeProvider } from '@mui/material/styles';
4 | import CssBaseline from '@mui/material/CssBaseline';
5 | import theme from '@/theme';
6 |
7 | export default function RootLayout(props: { children: React.ReactNode }) {
8 | return (
9 |
10 |
11 |
12 |
13 | {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
14 |
15 | {props.children}
16 |
17 |
18 |
19 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/structural/6.flyweight.js:
--------------------------------------------------------------------------------
1 | class Car {
2 | constructor(model, price) {
3 | this.model = model;
4 | this.price = price;
5 | }
6 | }
7 |
8 | class CarFactory {
9 | constructor() {
10 | this.cars = [];
11 | }
12 |
13 | getCar(model) {
14 | return this.cars.find(car => car.model === model);
15 | }
16 |
17 | create(model, price) {
18 | const candidate = this.getCar(model);
19 | if (candidate) {
20 | return candidate;
21 | }
22 |
23 | const newCar = new Car(model, price);
24 | this.cars.push(newCar);
25 | return newCar;
26 | }
27 | }
28 |
29 | const factory = new CarFactory();
30 |
31 | const bmwX6 = factory.create('bmw x6', 100000);
32 | const audi = factory.create('audi a6', 90000);
33 | const bmwX6Second = factory.create('bmw x6', 100000);
34 |
35 | console.log(bmwX6 === bmwX6Second);
36 |
--------------------------------------------------------------------------------
/lectures/19-react-ui/task.md:
--------------------------------------------------------------------------------
1 | # React UI. Managing State.
2 |
3 | [Template](https://www.figma.com/file/HJtTPFc67QoIF82yIqoB1T/%5BHomework%5D-Class-and-Functional-Components?node-id=0%3A1&t=wItenMikHEiPGOlV-1)
4 | (You have to sign up to see the styles. Let me know if you have any issues.)
5 |
6 | Avatar app: where possible to add more tiles with random avatars or refresh all tiles. Use https://tinyfac.es/. Design [here](https://www.figma.com/file/HJtTPFc67QoIF82yIqoB1T/%5BHomework%5D-Class-and-Functional-Components?node-id=0%3A1&t=wItenMikHEiPGOlV-1). Assets are [here](https://drive.google.com/drive/u/1/folders/1UywgqalcaJKoix3U8Jt4ugembn2L0gps).
7 |
8 | AC:
9 |
10 | - As a user I would like to be able to add the tile with random avatar
11 | - As a user I would like to be able to refresh the avatar
12 | - As a user I would like to be able to refresh all avatars
13 |
14 | Good Luck!
15 |
--------------------------------------------------------------------------------
/lectures/15-typescript-basics/code_examples/4-object.ts:
--------------------------------------------------------------------------------
1 | // object - built in type in ts
2 | const person: object = {
3 | name: 'John',
4 | age: { a: '213', b: [true, 1] },
5 | };
6 | console.log('person', person);
7 |
8 | // ? -> this field could not be presented in object
9 |
10 | // { key?: valueType } => key could be or not to be inside
11 |
12 | // key: type | undefined => key MUST be inside of the object,
13 | // but with possibility of value as undefined
14 |
15 | const person1: {
16 | name: string;
17 | age?: number; // optional
18 | } = {
19 | name: 'John',
20 | };
21 |
22 | console.log(person1.age);
23 | // person1.test = 123; // error
24 |
25 | type Person2 = {
26 | [key: string]: string;
27 | };
28 |
29 | const person2: Person2 = { aadsda: '2212', 223: 'sddsd', ['true']: 'aasffsa' };
30 |
31 |
32 | const user: { name: string, age?: number } = { name: 'Vlad' }
33 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/di/1.wtihout-di.js:
--------------------------------------------------------------------------------
1 | class Engine {}
2 | class ElectroEngine {}
3 | class Transmission {}
4 | class Chassis {}
5 | class TestChassis {}
6 |
7 | // CAR -> ENGINE
8 | // CAR -> Transmission
9 | // CAR -> Chassis
10 |
11 | class Car {
12 | constructor() {
13 | this.engine = new Engine();
14 | this.transmission = new Transmission();
15 | this.chassis = new Chassis();
16 | }
17 | }
18 |
19 | class ElectroCar {
20 | constructor() {
21 | this.engine = new ElectroEngine();
22 | this.transmission = new Transmission();
23 | this.chassis = new Chassis();
24 | }
25 | }
26 |
27 | class TestCar {
28 | constructor() {
29 | this.engine = new Engine();
30 | this.transmission = new Transmission();
31 | this.chassis = new TestChassis();
32 | }
33 | }
34 |
35 | const car = new Car();
36 | const electroCar = new ElectroCar();
37 | const testCar = new TestCar();
38 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/app/globals.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --background: #ffffff;
3 | --foreground: #171717;
4 | }
5 |
6 | @media (prefers-color-scheme: dark) {
7 | :root {
8 | --background: #0a0a0a;
9 | --foreground: #ededed;
10 | }
11 | }
12 |
13 | html,
14 | body {
15 | max-width: 100vw;
16 | overflow-x: hidden;
17 | }
18 |
19 | header {
20 | display: flex;
21 | gap: 10px;
22 | padding: 10px;
23 | background-color: #f0f0f0;
24 | justify-content: center;
25 | }
26 |
27 | body {
28 | color: var(--foreground);
29 | background: var(--background);
30 | font-family: Arial, Helvetica, sans-serif;
31 | -webkit-font-smoothing: antialiased;
32 | -moz-osx-font-smoothing: grayscale;
33 | }
34 |
35 | * {
36 | box-sizing: border-box;
37 | padding: 0;
38 | margin: 0;
39 | }
40 |
41 | @media (prefers-color-scheme: dark) {
42 | html {
43 | color-scheme: dark;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/store/slices/selectedOrders.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit';
2 |
3 | import { Order } from '@/interfaces';
4 |
5 | const initialState: Order[] = [];
6 |
7 | export const selectedOrders = createSlice({
8 | name: 'selectedOrders',
9 | initialState,
10 | reducers: {
11 | addOrder: (state, { payload }: PayloadAction) => {
12 | state.push(payload);
13 | },
14 | removeOrder: (state, { payload }: PayloadAction) => {
15 | const index = state.findIndex(({ id }) => id === payload.id);
16 |
17 | if (index !== -1) {
18 | state.splice(index, 1);
19 | }
20 | },
21 | },
22 | });
23 |
24 | // Action creators are generated for each case reducer function
25 | export const { addOrder, removeOrder } = selectedOrders.actions;
26 |
27 | export default selectedOrders.reducer;
28 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/lib/store.ts:
--------------------------------------------------------------------------------
1 | import { configureStore } from '@reduxjs/toolkit';
2 |
3 | import selectedOrdersReducer from '@/store/slices/selectedOrders';
4 | import counterReducer from '@/store/slices/counter';
5 | import { ordersApi } from '@/store';
6 |
7 | export const makeStore = () => {
8 | return configureStore({
9 | reducer: {
10 | selectedOrders: selectedOrdersReducer,
11 | counter: counterReducer,
12 | [ordersApi.reducerPath]: ordersApi.reducer,
13 | },
14 | middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(ordersApi.middleware),
15 | });
16 | };
17 |
18 | // Infer the type of makeStore
19 | export type AppStore = ReturnType;
20 | // Infer the `RootState` and `AppDispatch` types from the store itself
21 | export type RootState = ReturnType;
22 | export type AppDispatch = AppStore['dispatch'];
23 |
--------------------------------------------------------------------------------
/lectures/10-js-advanced-3/practice/event-loop.js:
--------------------------------------------------------------------------------
1 | console.log("Start"); // Synchronous code
2 | // Synchronous code is executed first, line by line.
3 |
4 | setTimeout(() => {
5 | console.log("Macrotask: setTimeout"); // Macrotask
6 | // This callback is added to the macrotask queue and will execute after the microtasks are completed.
7 | }, 0);
8 |
9 | Promise.resolve()
10 | .then(() => {
11 | console.log("Microtask: Promise.then 1"); // Microtask
12 | // Microtasks from Promises are added to the microtask queue and executed after synchronous code.
13 | })
14 | .then(() => {
15 | console.log("Microtask: Promise.then 2"); // Microtask
16 | // Chained `.then` creates another microtask, which is executed immediately after the previous one.
17 | });
18 |
19 | console.log("End"); // Synchronous code
20 | // The event loop processes synchronous code first, then microtasks, and finally macrotasks.
21 |
--------------------------------------------------------------------------------
/lectures/07-js-basics-2/README.md:
--------------------------------------------------------------------------------
1 | # JS Basic 2
2 |
3 | Here's you can find materials about JS Basic 2
4 |
5 | [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/EctAgX1XunRDqMMH_p9ioXUBTAmB-7Ey0wBja2rQ_J3Elg)
6 |
7 | [Video](https://solvdportal-my.sharepoint.com/:v:/r/personal/laba_solvd_com/Documents/Recordings/Development-React.js-2025-01-20250328_140332-Meeting%20Recording.mp4?csf=1&web=1&e=BiFI4I&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D)
8 |
9 | Useful links
10 |
11 | - [Objects: the basics](https://javascript.info/object-basics)
12 | - [Arrays](https://javascript.info/array)
13 | - [Arrays methods](https://javascript.info/array-methods)
14 | - [Deep vs Shallow](https://medium.com/version-1/cloning-an-object-in-javascript-shallow-copy-vs-deep-copy-fa8acd6681e9)
15 |
--------------------------------------------------------------------------------
/lectures/15-typescript-basics/README.md:
--------------------------------------------------------------------------------
1 | # TypeScript
2 |
3 | Here's you can find materials about "TypeScript"
4 |
5 | [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/EYN6yllUJFlFlul6BG0otA0BHX41kLop6VLopUIsiw_j1Q?e=MBYA4L)
6 |
7 | [Video](https://solvdportal-my.sharepoint.com/:v:/r/personal/laba_solvd_com/Documents/Recordings/Development-React.js-2025-01-20250425_140152-Meeting%20Recording.mp4?csf=1&web=1&e=l7h7tg&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D)
8 |
9 | Useful links
10 |
11 | - [The TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/intro.html)
12 | - [TypeScript Tutorial](https://www.w3schools.com/typescript/)
13 | - [TypeScript Exercises](https://exercism.org/tracks/typescript/exercises)
14 | - [TypeScript Exercises 2](https://typehero.dev/)
15 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "base-2025",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev --turbopack",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "@emotion/cache": "^11.14.0",
13 | "@emotion/styled": "^11.14.0",
14 | "@mui/icons-material": "^7.1.1",
15 | "@mui/material": "^7.1.1",
16 | "@mui/material-nextjs": "^7.1.1",
17 | "@reduxjs/toolkit": "^2.8.2",
18 | "next": "15.3.3",
19 | "react": "^19.0.0",
20 | "react-dom": "^19.0.0",
21 | "react-redux": "^9.2.0"
22 | },
23 | "devDependencies": {
24 | "@eslint/eslintrc": "^3",
25 | "@types/node": "^20",
26 | "@types/react": "^19",
27 | "@types/react-dom": "^19",
28 | "eslint": "^9",
29 | "eslint-config-next": "15.3.3",
30 | "typescript": "^5"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lectures/16-typescript-advanced/README.md:
--------------------------------------------------------------------------------
1 | # TypeScript
2 |
3 | Here's you can find materials about "TypeScript"
4 |
5 | [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/EaSI7fPK4OhEikaxZolaoHMBwpXWDIfrR6tlAPr24Z4gmQ?e=ZwFogk)
6 |
7 | [Video](https://solvdportal-my.sharepoint.com/:v:/r/personal/laba_solvd_com/Documents/Recordings/Development-React.js-2025-01-20250429_140246-Meeting%20Recording.mp4?csf=1&web=1&e=wbrxbT&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D)
8 |
9 | Useful links
10 |
11 | - [The TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/intro.html)
12 | - [TypeScript Tutorial](https://www.w3schools.com/typescript/)
13 | - [TypeScript Exercises](https://exercism.org/tracks/typescript/exercises)
14 | - [TypeScript Exercises 2](https://typehero.dev/)
15 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/di/2.with-di.js:
--------------------------------------------------------------------------------
1 | class Engine {}
2 | class ElectroEngine {}
3 | class TestEngine {}
4 |
5 | class Transmission {}
6 | class TestTransmission {}
7 |
8 | class Chassis {}
9 | class SportChassis {}
10 | class TestChassis {}
11 |
12 | // CAR -> IEngine <- Engine
13 | // CAR -> ITransmission <- Transmission
14 | // CAR -> IChassis <- Chassis
15 |
16 | class Car {
17 | constructor(engine, transmission, chassis) {
18 | this.engine = engine;
19 | this.transmission = transmission;
20 | this.chassis = chassis;
21 | }
22 | }
23 |
24 | const petrolCar = new Car(new Engine(), new Transmission(), new Chassis());
25 | const sportCar = new Car(new Engine(), new Transmission(), new SportChassis());
26 | const electroCar = new Car(
27 | new ElectroEngine(),
28 | new Transmission(),
29 | new Chassis()
30 | );
31 | const testCar = new Car(
32 | new TestEngine(),
33 | new TestTransmission(),
34 | new TestChassis()
35 | );
36 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/assets/icons/youtube.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/lectures/12-data-structures-and-algorithms/README.md:
--------------------------------------------------------------------------------
1 | # Data structures & algorithms
2 |
3 | Here's you can find materials about "Data structures & algorithms"
4 |
5 | [Presentation](https://docs.google.com/presentation/d/13K-7cTsBQplJ7xnQdhz94G4vlG6Q69gscUmip9mG9I8/edit#slide=id.p1)
6 |
7 | [Video](https://solvdportal-my.sharepoint.com/personal/laba_solvd_com/_layouts/15/stream.aspx?id=%2Fpersonal%2Flaba%5Fsolvd%5Fcom%2FDocuments%2FRecordings%2FDevelopment%2DReact%2Ejs%2D2025%2D01%2D20250415%5F150344%2DMeeting%20Recording%2Emp4&referrer=StreamWebApp%2EWeb&referrerScenario=AddressBarCopied%2Eview%2E5f7c4cef%2Dd2ff%2D45f0%2Dbf18%2Ddb7c08c0ac70)
8 |
9 | Useful links
10 |
11 | - [Data Structures Tutorial](https://www.scaler.com/topics/data-structures/)
12 | - [Javascript Algorithms repo](https://github.com/trekhleb/javascript-algorithms)
13 | - [Data Structures and Algorithms on YouTube](https://www.youtube.com/playlist?list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8)
14 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/components/Button.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Button from './Button';
3 | import {render, fireEvent, cleanup, screen} from '@testing-library/react';
4 |
5 | afterEach(cleanup);
6 |
7 | const defaultProps = {
8 | onClick: jest.fn(),
9 | text: 'Submit',
10 | };
11 |
12 | describe('Button props', () => {
13 | test('button renders with correct text', () => {
14 | const {rerender} = render();
15 | expect(screen.getByText('Submit')).toBeTruthy();
16 |
17 | rerender()
18 | expect(screen.getByText("Go")).toBeTruthy()
19 | });
20 |
21 | test('calls correct function on click', () => {
22 | const onClick = jest.fn()
23 | render();
24 | fireEvent.click(screen.getByText(defaultProps.text))
25 | expect(onClick).toHaveBeenCalled()
26 | });
27 | })
28 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/pages/_app.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import Head from 'next/head';
3 | import { AppProps } from 'next/app';
4 | import { AppCacheProvider } from '@mui/material-nextjs/v14-pagesRouter';
5 | import { ThemeProvider } from '@mui/material/styles';
6 | import CssBaseline from '@mui/material/CssBaseline';
7 | import theme from '../src/theme';
8 |
9 | export default function MyApp(props: AppProps) {
10 | const { Component, pageProps } = props;
11 | return (
12 |
13 |
14 |
15 |
16 |
17 | {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
18 |
19 |
20 |
21 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/lectures/08-js-advanced/README.md:
--------------------------------------------------------------------------------
1 | # JS Advanced 1
2 |
3 | Here's you can find materials about JS Advanced 1
4 |
5 | [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/EYcqRThrOhlJimKv6UfqD4cB9I5iljYRXgGoOnlTL5tuBA)
6 |
7 | [Video from Prev Laba](https://drive.google.com/file/d/11v7_WF4AGxOr4sY84Tl1UhiDwE7cpktb/view)
8 | [Video from Current Laba](https://solvdportal-my.sharepoint.com/:v:/r/personal/laba_solvd_com/Documents/Recordings/Development-React.js-2025-01-20250401_140128-Meeting%20Recording.mp4?csf=1&web=1&e=AoyAdH&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D)
9 |
10 |
11 | Useful links
12 |
13 | - [Map and Set](https://javascript.info/map-set)
14 | - [WeakMap and WeakSet](https://javascript.info/weakmap-weakset)
15 | - [JSON](https://javascript.info/json)
16 | - [Symbol](https://javascript.info/symbol)
17 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "material-ui-nextjs-ts",
3 | "version": "5.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint",
10 | "post-update": "echo \"codesandbox preview only, need an update\" && pnpm update --latest"
11 | },
12 | "dependencies": {
13 | "@emotion/cache": "latest",
14 | "@emotion/react": "latest",
15 | "@emotion/styled": "latest",
16 | "@mui/icons-material": "latest",
17 | "@mui/material": "latest",
18 | "@mui/material-nextjs": "latest",
19 | "next": "latest",
20 | "react": "latest",
21 | "react-dom": "latest"
22 | },
23 | "devDependencies": {
24 | "@types/node": "latest",
25 | "@types/react": "latest",
26 | "@types/react-dom": "latest",
27 | "eslint": "latest",
28 | "eslint-config-next": "latest",
29 | "typescript": "latest"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/creational/1.constructor.js:
--------------------------------------------------------------------------------
1 | /**
2 | * The construct pattern is the simplest, modern, and one of the most popular
3 | * sub-categories of creational design patterns in JavaScript.
4 | * The main purpose of this pattern is to felicitate the constructor's creation.
5 | */
6 |
7 | class Car {
8 | constructor(model, year, miles) {
9 | this.model = model;
10 | this.year = year;
11 | this.miles = miles;
12 |
13 | this.toString = function () {
14 | return `${this.model} has done ${this.miles} miles`;
15 | };
16 | }
17 | }
18 |
19 | // Usage:
20 | const civic = new Car('Honda Civic', 2008, 21000);
21 | const mondeo = new Car('Ford Mondeo', 2010, 5000);
22 |
23 | console.log(civic.toString());
24 | console.log(mondeo.toString());
25 |
26 | // function Car(model, year, miles) {
27 | // this.model = model;
28 | // this.year = year;
29 | // this.miles = miles;
30 | // }
31 |
32 | // const civic = new Car('Honda Civic', 2008, 21000);
33 | // console.log(civic)
34 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/task.md:
--------------------------------------------------------------------------------
1 | # CSR, SSR, SSG, Next.js
2 |
3 | [Template](https://www.figma.com/file/HJtTPFc67QoIF82yIqoB1T/%5BHomework%5D-Class-and-Functional-Components?node-id=0%3A1&t=wItenMikHEiPGOlV-1)
4 | (You have to sign up to see the styles. Let me know if you have any issues.)
5 |
6 | Avatar app: where possible to add more tiles with random avatars or refresh all tiles. Use https://tinyfac.es/. Design [here](https://www.figma.com/file/HJtTPFc67QoIF82yIqoB1T/%5BHomework%5D-Class-and-Functional-Components?node-id=0%3A1&t=wItenMikHEiPGOlV-1). Assets are [here](https://drive.google.com/drive/u/1/folders/1UywgqalcaJKoix3U8Jt4ugembn2L0gps).
7 |
8 | AC:
9 |
10 | - Use styles from previous homeworks
11 | - Use Next.js (use app router)
12 | - Load 5 avatars for initial load using SSR and SSG (create two separate pages for it, e.g. /ssr and /ssg)
13 | - Deploy your application on any free host. (Example.)[https://nextjs.org/learn/basics/deploying-nextjs-app]
14 | - Use Typescript.
15 |
16 | Good Luck!
17 |
--------------------------------------------------------------------------------
/lectures/04-css/practice/positioning/styles.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | margin: 0;
4 | }
5 |
6 | body {
7 | height: 1000vh;
8 | }
9 |
10 | .section {
11 | border: 4px solid blue;
12 | padding: 40px;
13 | margin-bottom: 100px;
14 | }
15 |
16 | .box {
17 | width: 400px;
18 | height: 400px;
19 | background: red;
20 | }
21 |
22 | .section__title {
23 | text-align: center;
24 | text-transform: uppercase;
25 | margin-bottom: 40px;
26 | }
27 |
28 | .relative {
29 | position: relative;
30 | top: -140px;
31 | left: 20px;
32 | }
33 |
34 | .absolute__container {
35 | position: relative;
36 | }
37 |
38 | .absolute__inner {
39 | position: absolute;
40 | top: 40px;
41 | left: 40px;
42 | background: purple;
43 | }
44 |
45 | .fixed {
46 | position: fixed;
47 | right: 20px;
48 | bottom: 20px;
49 | }
50 |
51 | .sticky__container {
52 | height: 500vh;
53 | border: 4px dashed darkblue;
54 | padding: 40px;
55 | }
56 |
57 | .sticky__inner {
58 | position: sticky;
59 | top: 40px;
60 | }
61 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/behaviour/4.observer.js:
--------------------------------------------------------------------------------
1 | class AutoNews {
2 | constructor() {
3 | this.news = '';
4 | this.actions = [];
5 | }
6 |
7 | setNews(text) {
8 | this.news = text;
9 | this.notifyAll();
10 | }
11 |
12 | notifyAll() {
13 | return this.actions.forEach(subs => subs.inform(this.news));
14 | }
15 |
16 | register(observer) {
17 | this.actions.push(observer);
18 | }
19 |
20 | unregister(observer) {
21 | this.actions = this.actions.filter(el => !(el instanceof observer));
22 | }
23 | }
24 |
25 | class Misha {
26 | inform(message) {
27 | console.log(`Misha has been informed about: ${message}`);
28 | }
29 | }
30 |
31 | class Dima {
32 | inform(message) {
33 | console.log(`Dima has been informed about: ${message}`);
34 | }
35 | }
36 |
37 | const autoNews = new AutoNews();
38 | autoNews.register(new Misha());
39 | autoNews.register(new Dima());
40 |
41 | autoNews.setNews('I love patterns');
42 | autoNews.setNews('I love football');
43 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "material-ui-nextjs-pages-router-ts",
3 | "version": "5.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint",
10 | "post-update": "echo \"codesandbox preview only, need an update\" && pnpm update --latest"
11 | },
12 | "dependencies": {
13 | "@emotion/cache": "latest",
14 | "@emotion/react": "latest",
15 | "@emotion/server": "latest",
16 | "@emotion/styled": "latest",
17 | "@mui/icons-material": "latest",
18 | "@mui/material": "latest",
19 | "@mui/material-nextjs": "latest",
20 | "next": "latest",
21 | "react": "latest",
22 | "react-dom": "latest"
23 | },
24 | "devDependencies": {
25 | "@types/node": "latest",
26 | "@types/react": "latest",
27 | "eslint": "latest",
28 | "eslint-config-next": "latest",
29 | "typescript": "latest"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lectures/15-typescript-basics/code_examples/5-type-aliases.ts:
--------------------------------------------------------------------------------
1 | type Point = {
2 | x: number;
3 | y: number;
4 | };
5 |
6 | const point: Point = { x: 1, y: 90 };
7 | console.log('point', point);
8 |
9 |
10 |
11 |
12 | let userName: string = 'Vlad'
13 |
14 | type Combinable = 'as-number' | 'as-text'; // type alias
15 |
16 | function combine(param1: number | string, param2: number | string, resultConvertion: Combinable) {
17 | let result;
18 |
19 | if (typeof param1 === 'number' && typeof param2 === 'number') {
20 | result = param1 + param2;
21 | } else {
22 | result = param1.toString() + param2.toString();
23 | }
24 |
25 | if (resultConvertion === 'as-number') {
26 | return +result;
27 | } else {
28 | return result.toString();
29 | }
30 | }
31 |
32 | const combinedNumbers = combine('1', '2', 'as-number');
33 | const combinedStrings = combine('Test1', 'Test2', 'as-text');
34 |
35 | console.log('combinedNumbers', combinedNumbers);
36 | console.log('combinedStrings', combinedStrings);
37 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "base-2025",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev --turbopack",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "@emotion/cache": "^11.14.0",
13 | "@emotion/styled": "^11.14.0",
14 | "@mui/icons-material": "^7.1.1",
15 | "@mui/material": "^7.1.1",
16 | "@mui/material-nextjs": "^7.1.1",
17 | "@tanstack/react-query": "^5.80.7",
18 | "@tanstack/react-query-devtools": "^5.80.7",
19 | "i": "^0.3.7",
20 | "next": "15.3.3",
21 | "npm": "^11.4.2",
22 | "react": "^19.0.0",
23 | "react-dom": "^19.0.0"
24 | },
25 | "devDependencies": {
26 | "@eslint/eslintrc": "^3",
27 | "@types/node": "^20",
28 | "@types/react": "^19",
29 | "@types/react-dom": "^19",
30 | "eslint": "^9",
31 | "eslint-config-next": "15.3.3",
32 | "typescript": "^5"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/public/globe.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-chakra-ui-app/src/components/CTA.tsx:
--------------------------------------------------------------------------------
1 | import { Link as ChakraLink, Button } from "@chakra-ui/react";
2 |
3 | import { Container } from "./Container";
4 |
5 | export const CTA = () => (
6 |
14 |
27 |
40 |
41 | );
42 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/behaviour/7.strategy.ts:
--------------------------------------------------------------------------------
1 | interface RouteStrategy {
2 | buildRoute: (a: string, b: string) => string;
3 | }
4 |
5 | class RoadStrategy implements RouteStrategy {
6 | buildRoute(a = '', b = '') {
7 | return `route by road from ${a} to ${b}`;
8 | }
9 | }
10 |
11 | class PublicTransportStrategy implements RouteStrategy {
12 | buildRoute(a = '', b = '') {
13 | return `route by by public transport from ${a} to ${b}`;
14 | }
15 | }
16 |
17 | class MyNavigator {
18 | private routeStrategy: RouteStrategy;
19 |
20 | constructor(strategy: RouteStrategy) {
21 | this.routeStrategy = strategy;
22 | }
23 |
24 | public setStrategy(strategy: RouteStrategy) {
25 | this.routeStrategy = strategy;
26 | }
27 |
28 | public makeRoute(a = '', b = '') {
29 | return this.routeStrategy.buildRoute(a, b);
30 | }
31 | }
32 |
33 | const nav = new MyNavigator(new RoadStrategy());
34 | console.log(nav.makeRoute('Kyiv', 'London'));
35 | nav.setStrategy(new PublicTransportStrategy());
36 | console.log(nav.makeRoute('Kyiv', 'London'));
37 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/public/globe.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/state-management-react/context/public/globe.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import Container from '@mui/material/Container';
3 | import Typography from '@mui/material/Typography';
4 | import Box from '@mui/material/Box';
5 | import Link from '../src/Link';
6 | import ProTip from '../src/ProTip';
7 | import Copyright from '../src/Copyright';
8 |
9 | export default function Home() {
10 | return (
11 |
12 |
21 |
22 | Material UI - Next.js example in TypeScript
23 |
24 |
25 | Go to the about page
26 |
27 |
28 |
29 |
30 |
31 | );
32 | }
33 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/creational/5.builder.js:
--------------------------------------------------------------------------------
1 | class Car {
2 | constructor() {
3 | this.autoPilot = false;
4 | this.parktronik = false;
5 | this.signaling = false;
6 | }
7 | }
8 |
9 | class CarBuilder {
10 | constructor() {
11 | this.car = new Car();
12 | }
13 |
14 | addAutoPilot(autoPilot) {
15 | this.car.autoPilot = autoPilot;
16 | return this;
17 | }
18 |
19 | addParktronik(parktronik) {
20 | this.car.parktronik = parktronik;
21 | return this;
22 | }
23 |
24 | addSignaling(signaling) {
25 | this.car.signaling = signaling;
26 | return this;
27 | }
28 |
29 | updateEngine(engine) {
30 | this.car.engine = engine;
31 | return this;
32 | }
33 |
34 | build() {
35 | return this.car;
36 | }
37 | }
38 |
39 | const myCar = new CarBuilder()
40 | .addAutoPilot(true)
41 | .addParktronik(true)
42 | .updateEngine('V6')
43 | .build();
44 |
45 | console.log(myCar);
46 |
47 | const myCar2 = new CarBuilder().addSignaling(true).addParktronik(true).build();
48 | console.log(myCar2);
49 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/public/globe.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/components/Orders/components/OrderItem.js:
--------------------------------------------------------------------------------
1 | import { Button, Grid } from '@mui/material';
2 |
3 | const OrderItem = ({
4 | id,
5 | name,
6 | date,
7 | shipTo,
8 | paymentMethod,
9 | amount,
10 | onAddOrder,
11 | onDeleteOrder,
12 | isSelected,
13 | }) => (
14 |
22 |
23 | {id}
24 |
25 |
26 | {date}
27 |
28 |
29 | {name}
30 |
31 |
32 | {shipTo}
33 |
34 |
35 | {paymentMethod}
36 |
37 |
38 | {amount}
39 |
40 |
41 | {!isSelected && }
42 | {isSelected && }
43 |
44 |
45 | );
46 |
47 | export default OrderItem;
48 |
--------------------------------------------------------------------------------
/workshops/state-management-react/rtk/src/store/api/orders.ts:
--------------------------------------------------------------------------------
1 | import { Order } from '@/interfaces';
2 | import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';
3 |
4 | export const ordersApi = createApi({
5 | reducerPath: 'ordersApi',
6 | baseQuery: fetchBaseQuery({ baseUrl: 'api' }),
7 | endpoints: (builder) => ({
8 | getOrders: builder.query({
9 | query: (page = 0) => `/orders?page=${page}`,
10 |
11 | // Only have one cache entry because the arg always maps to one string
12 | serializeQueryArgs: ({ endpointName }) => {
13 | return endpointName;
14 | },
15 | // Always merge incoming data to the cache entry
16 | merge: (currentCache, newItems) => {
17 | currentCache.push(...newItems);
18 | },
19 | // Refetch when the page arg changes
20 | forceRefetch({ currentArg, previousArg }) {
21 | return currentArg !== previousArg;
22 | },
23 | }),
24 | }),
25 | });
26 |
27 | export const { useLazyGetOrdersQuery } = ordersApi;
28 | // export const { useGetOrdersQuery } = ordersApi;
29 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/delegation.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Document
10 |
11 |
12 |
13 |
1 cell
14 |
2 cell
15 |
3 cell
16 |
4 cell
17 |
5 cell
18 |
6 cell
19 |
7 cell
20 |
8 cell
21 |
9 cell
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/src/ProTip.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import Link from '@mui/material/Link';
3 | import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
4 | import Typography from '@mui/material/Typography';
5 |
6 | function LightBulbIcon(props: SvgIconProps) {
7 | return (
8 |
9 |
10 |
11 | );
12 | }
13 |
14 | export default function ProTip() {
15 | return (
16 |
17 |
18 | {'Pro tip: See more '}
19 | templates
20 | {' in the Material UI documentation.'}
21 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/src/components/ProTip.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import Link from '@mui/material/Link';
3 | import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
4 | import Typography from '@mui/material/Typography';
5 |
6 | function LightBulbIcon(props: SvgIconProps) {
7 | return (
8 |
9 |
10 |
11 | );
12 | }
13 |
14 | export default function ProTip() {
15 | return (
16 |
17 |
18 | {'Pro tip: See more '}
19 | templates
20 | {' in the Material UI documentation.'}
21 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/script/2-node-properties.js:
--------------------------------------------------------------------------------
1 | // const section = document.querySelector('.profile');
2 |
3 | // console.log('section.tagName', section.tagName);
4 | // console.log(section.constructor.name);
5 | // console.dir(section);
6 | // console.log(section);
7 |
8 | /**
9 | * CONTENT
10 | */
11 | const userPosition = document.querySelector('.user-data__position');
12 | const strangeThings = document.querySelectorAll('div');
13 | // const userData = document.querySelector('.user-data');
14 |
15 | // console.log('userPosition.innerHTML', userPosition.innerHTML);
16 | // console.log('userPosition.outerHTML', userPosition.outerHTML);
17 |
18 | // userPosition.outerHTML = null;
19 | // strangeThings.length = 0;
20 | // strangeThings[0] = 1;
21 | // console.log('strangeThings', strangeThings);
22 | // userPosition.innerHTML = 'Changed position name';
23 | // userPosition.innerHTML += 'Changed position name';
24 |
25 | /**
26 | * !!!!
27 | */
28 | // userPosition.outerHTML = 'Changed position name
';
29 | // console.log(userPosition.outerHTML);
30 |
31 | // console.log(userData.textContent);
32 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-app",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.16.5",
7 | "@testing-library/react": "^13.4.0",
8 | "@testing-library/user-event": "^13.5.0",
9 | "react": "^18.2.0",
10 | "react-dom": "^18.2.0",
11 | "react-scripts": "5.0.1",
12 | "use-timeout": "^1.1.0",
13 | "web-vitals": "^2.1.4"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "test-with-coverage": "react-scripts test --coverage",
20 | "eject": "react-scripts eject"
21 | },
22 | "eslintConfig": {
23 | "extends": [
24 | "react-app",
25 | "react-app/jest"
26 | ]
27 | },
28 | "browserslist": {
29 | "production": [
30 | ">0.2%",
31 | "not dead",
32 | "not op_mini all"
33 | ],
34 | "development": [
35 | "last 1 chrome version",
36 | "last 1 firefox version",
37 | "last 1 safari version"
38 | ]
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/structural/3.facade.js:
--------------------------------------------------------------------------------
1 | class Bank {
2 | verify(amount) {
3 | return amount < 999;
4 | }
5 | }
6 |
7 | class CreditHistory {
8 | check(name) {
9 | return true;
10 | }
11 | }
12 |
13 | class Balance {
14 | check(name) {
15 | //to do api request
16 | return true;
17 | }
18 | }
19 |
20 | // facade
21 | class Credit {
22 | constructor(name) {
23 | this.name = name;
24 | }
25 |
26 | applyFor(amount) {
27 | const bankApproved = new Bank().verify(amount);
28 | const bankAnswer = bankApproved ? 'approved' : 'declined';
29 | const isPositiveBalance = new Balance().check(this.name);
30 | const balance = isPositiveBalance ? 'positive balance' : 'negative balance';
31 | const isGoodCreditHistory = new CreditHistory().check(this.name);
32 | const creditHistory = isGoodCreditHistory ? 'good' : 'poor';
33 |
34 | return `${this.name} bank result: ${bankAnswer}, balance: ${balance}, credit history: ${creditHistory}`;
35 | }
36 | }
37 |
38 | const credit = new Credit('Misha');
39 | const creditSmall = credit.applyFor(99);
40 | console.log(creditSmall);
41 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import Container from "@mui/material/Container";
3 | import Typography from "@mui/material/Typography";
4 | import Box from "@mui/material/Box";
5 | import Link from "@mui/material/Link";
6 | import NextLink from "next/link";
7 | import ProTip from "@/components/ProTip";
8 | import Copyright from "@/components/Copyright";
9 |
10 | export default function Home() {
11 | return (
12 |
13 |
22 |
23 | Material UI - Next.js App Router example in TypeScript
24 |
25 |
26 | Go to the about page
27 |
28 |
29 |
30 |
31 |
32 | );
33 | }
34 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/with-react-bootstrap-app/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lectures/05-css-advanced/practice/css-transforms/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | text-align: center;
4 | }
5 |
6 | .example {
7 | width: 100px;
8 | height: 100px;
9 | margin: 20px auto;
10 | background-color: lightblue;
11 | display: flex;
12 | align-items: center;
13 | justify-content: center;
14 | border: 1px solid #000;
15 | }
16 |
17 | /* Translate example */
18 | #translate {
19 | transform: translate(50px, 50px);
20 |
21 | }
22 |
23 | /* Rotate example */
24 | #rotate {
25 | transform: rotate(45deg);
26 | }
27 |
28 | /* Scale example */
29 | #scale {
30 | transform: scale(1.5);
31 | }
32 |
33 | /* Skew example */
34 | #skew {
35 | transform: skew(20deg, 10deg);
36 | }
37 |
38 | /* Matrix example */
39 | #matrix {
40 | transform: matrix(1, 0.5, -0.5, 1, 0, 0);
41 | }
42 |
43 | /* Perspective container */
44 | #perspective-container {
45 | perspective: 500px;
46 | }
47 |
48 | /* Perspective example */
49 | #perspective {
50 | transform: rotateY(45deg);
51 | }
52 |
53 | /* Transform Origin example */
54 | #transform-origin {
55 | transform: rotate(45deg);
56 | transform-origin: top left;
57 | }
58 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/pages/_document.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import { Html, Head, Main, NextScript, DocumentProps, DocumentContext } from 'next/document';
3 | import {
4 | DocumentHeadTags,
5 | DocumentHeadTagsProps,
6 | documentGetInitialProps,
7 | } from '@mui/material-nextjs/v14-pagesRouter';
8 | import theme, { roboto } from '../src/theme';
9 |
10 | export default function MyDocument(props: DocumentProps & DocumentHeadTagsProps) {
11 | return (
12 |
13 |
14 | {/* PWA primary color */}
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | );
26 | }
27 |
28 | MyDocument.getInitialProps = async (ctx: DocumentContext) => {
29 | const finalProps = await documentGetInitialProps(ctx);
30 | return finalProps;
31 | };
32 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/components/Counter.js:
--------------------------------------------------------------------------------
1 | import React, {useState, useEffect, useRef} from 'react';
2 | import Button from './Button';
3 |
4 | function Counter() {
5 | const [count, setCount] = useState(0);
6 | const [checked, setChecked] = useState(false);
7 | const initialTitleRef = useRef(document.title);
8 |
9 | useEffect(() => {
10 | document.title = checked
11 | ? `Total number of clicks: ${count}`
12 | : initialTitleRef.current;
13 | }, [checked, count]);
14 |
15 | return (
16 |
17 |
18 | Clicked {count} time{count === 1 ? '' : 's'}
19 |
20 |
21 |
34 | );
35 | }
36 |
37 | export default Counter;
38 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/react-example/my-app/src/components/useAPI.js:
--------------------------------------------------------------------------------
1 | import {useState, useCallback} from 'react';
2 |
3 | const useAPI = (initialData = null) => {
4 | const initialState = {
5 | data: initialData,
6 | success: false,
7 | loading: false,
8 | error: null,
9 | };
10 |
11 | const [response, setResponse] = useState(initialState);
12 |
13 | const callAPI = async (URL, options = {method: 'GET'}) => {
14 | setResponse({...response, success: false, loading: true});
15 | try {
16 | const response = await fetch(URL, options);
17 | if (response.status < 200 || response.status >= 300)
18 | throw new Error('Failed to fetch');
19 | const json = await response.json();
20 | setResponse({
21 | data: json,
22 | success: true,
23 | loading: false,
24 | error: null,
25 | });
26 | } catch (e) {
27 | setResponse({
28 | data: initialData,
29 | success: false,
30 | loading: false,
31 | error: e.message,
32 | });
33 | }
34 | };
35 |
36 | return [response, useCallback(callAPI, [])];
37 | };
38 |
39 | export default useAPI;
40 |
--------------------------------------------------------------------------------
/lectures/04-css/practice/positioning/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
9 |
10 |
14 |
15 |
19 |
20 |
26 |
27 |
31 |
32 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from 'next';
2 | import { Geist, Geist_Mono } from 'next/font/google';
3 | import './globals.css';
4 | import Link from 'next/link';
5 |
6 | const geistSans = Geist({
7 | variable: '--font-geist-sans',
8 | subsets: ['latin'],
9 | });
10 |
11 | const geistMono = Geist_Mono({
12 | variable: '--font-geist-mono',
13 | subsets: ['latin'],
14 | });
15 |
16 | export const metadata: Metadata = {
17 | title: 'Create Next App',
18 | description: 'Generated by create next app',
19 | };
20 |
21 | export default function RootLayout({
22 | children,
23 | }: Readonly<{
24 | children: React.ReactNode;
25 | }>) {
26 | return (
27 |
28 |
29 |
30 | Home
31 | React CSR Approach
32 |
33 | Fetch API Approach No Cache
34 |
35 | Fetch API Approach Cache
36 |
37 | {children}
38 |
39 |
40 | );
41 | }
42 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/components/OrdersByPage/index.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 | import { useState } from 'react';
3 |
4 | import { Orders } from '@/components';
5 |
6 | import { useQueryClient } from '@tanstack/react-query';
7 | import { Order } from '@/interfaces';
8 |
9 | type InfiniteOrdersData = {
10 | pages: Order[][];
11 | pageParams: number[];
12 | };
13 |
14 | const OrdersByPage = () => {
15 | const [page, setPage] = useState(0);
16 |
17 | const queryClient = useQueryClient();
18 | const orders = queryClient.getQueryData(['orders']);
19 |
20 | return (
21 | <>
22 | setPage(Number(e.target.value))} />
23 |
24 | {}}
27 | isLoading={false}
28 | orders={orders?.pages?.[page] || []}
29 | selectedOrders={[]}
30 | isFetching={false}
31 | onLoadMoreButtonClick={() => {}}
32 | onSelectOrder={() => {}}
33 | onDeleteSelectedOrder={() => {}}
34 | />
35 | >
36 | );
37 | };
38 |
39 | export default OrdersByPage;
40 |
--------------------------------------------------------------------------------
/lectures/02-git/README.md:
--------------------------------------------------------------------------------
1 | # Git
2 |
3 | Here's you can find materials about Git
4 |
5 | [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/ESnpbhR9O9tCsXTpNhmS5Q4BmmSmk2_mxValG6am0zTyUQ)
6 |
7 | [Video](https://solvdportal-my.sharepoint.com/personal/laba_solvd_com/_layouts/15/stream.aspx?id=%2Fpersonal%2Flaba%5Fsolvd%5Fcom%2FDocuments%2FRecordings%2FDevelopment%2DReact%2Ejs%2D2025%2D01%2D20250221%5F150315%2DMeeting%20Recording%2Emp4&referrer=StreamWebApp%2EWeb&referrerScenario=AddressBarCopied%2Eview%2E2d9440a3%2D5430%2D4d6d%2Da104%2D2bc314a3c9b9)
8 |
9 | [Material](https://docs.google.com/document/d/1ICJd-7WS-kGWWVwsN0IS_ao7GSkFjeJ9y6JsxTFaLF0/edit?usp=sharing)
10 |
11 | Useful links
12 |
13 | - [Git Tutorial](https://www.w3schools.com/git/default.asp?remote=github)
14 | - [Learn Git Branching](https://learngitbranching.js.org/)
15 | - [About Git](https://docs.github.com/en/get-started/using-git/about-git)
16 | - [Understanding Git through images](https://dev.to/nopenoshishi/understanding-git-through-images-4an1)
17 | - [Version Control System](https://www.youtube.com/watch?v=zbKdDsNNOhg)
18 | - [How to Write a Git Commit Message](https://cbea.ms/git-commit/)
19 |
--------------------------------------------------------------------------------
/lectures/16-typescript-advanced/code_examples/6-utility-types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * PARTIAL
3 | */
4 | interface PartialTest {
5 | prop1: number;
6 | prop2: string;
7 | prop3: boolean;
8 | prop4: (value: number) => number;
9 | }
10 |
11 | class PartialClassImpl1 implements PartialTest {
12 | prop1: number;
13 | prop2: string;
14 | prop3: boolean;
15 | // prop4: (value: number) => number;
16 | }
17 |
18 | class PartialClassImpl2 implements Partial {
19 | prop1: number;
20 | prop2: string;
21 | prop3: boolean;
22 | prop4: (value: number) => number;
23 | }
24 |
25 | /**
26 | * RECORD
27 | */
28 | const someObg: Record = {
29 | test: 'some string',
30 | value: 123,
31 | value1: 123,
32 | value2: 123,
33 | };
34 | someObg.newProp = 123;
35 |
36 | /**
37 | * OMIT
38 | */
39 | type Cell = {
40 | x: number;
41 | y: number;
42 | description: string;
43 | refs: string[];
44 | };
45 |
46 | type SimplifiedCell = Omit;
47 |
48 | const commonCell: Cell = {
49 | x: 1,
50 | y: 1,
51 | description: 'text',
52 | refs: [],
53 | };
54 |
55 | const simpleCell: SimplifiedCell = {
56 | x: 1,
57 | y: 1,
58 | };
59 |
60 | export {};
61 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-pages-router-ts/pages/about.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import Container from '@mui/material/Container';
3 | import Typography from '@mui/material/Typography';
4 | import Box from '@mui/material/Box';
5 | import Button from '@mui/material/Button';
6 | import Link from '../src/Link';
7 | import ProTip from '../src/ProTip';
8 | import Copyright from '../src/Copyright';
9 |
10 | export default function About() {
11 | return (
12 |
13 |
22 |
23 | Material UI - Next.js example in TypeScript
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/workshops/ui-libraries/material-ui-nextjs-ts/src/app/about/page.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import Container from '@mui/material/Container';
3 | import Typography from '@mui/material/Typography';
4 | import Box from '@mui/material/Box';
5 | import Button from '@mui/material/Button';
6 | import NextLink from 'next/link';
7 | import ProTip from '@/components/ProTip';
8 | import Copyright from '@/components/Copyright';
9 |
10 | export default function About() {
11 | return (
12 |
13 |
22 |
23 | Material UI - Next.js example in TypeScript
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/task.md:
--------------------------------------------------------------------------------
1 | # React Basics
2 |
3 | [Template](https://www.figma.com/file/im5lrOuwj1whpmKRkmBq4m/Traffic-Light-React)
4 | (You have to sign up to see the styles. Let me know if you have any issues.)
5 |
6 | Your task is to implement the switchable, simplified and pixel-perfected version traffic light using React library and Babel (you can find an example of connecting babel and react in the root of 'practice' folder for this lecture). Create three containers which represent three states of the traffic light. Render the first container into the page using **ReactDOM.render** method and switch the states using **ReactDOM.render** and **setTimeout** or **setInterval**. The states should be looped (the red state should go after the green state).
7 |
8 | Out of the scope, but could be useful for a deeper understanding of how reconciliation works: When the main task will be done, check how React updates the DOM on each **ReactDOM.render** call. Try to break the first rule of the reconciliation algorithm by changing the root element of each state. For example, the root element for the red state is div, for yellow - section, etc. Take a look now at how React updates to DOM.
9 |
10 | Good Luck!
11 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/practice/src/app/tasks/[id]/page.tsx:
--------------------------------------------------------------------------------
1 | import { notFound } from 'next/navigation';
2 | import { Task } from '@/interfaces/task';
3 |
4 | /**
5 | * this page is dynamic by default because of wildcard [id]
6 | */
7 | export default async function TaskSinglePage({
8 | params,
9 | }: {
10 | params: Promise<{ id: string }>;
11 | }) {
12 | const { id } = await params;
13 |
14 | // const task = await fetch(`http://localhost:3001/api/tasks/${id}`, {
15 | // next: { revalidate: false }, // means: cache indefinitely after first build
16 | // });
17 | const task = await fetch(`http://localhost:3001/api/tasks/${id}`);
18 | const data: Task = await task.json();
19 |
20 | if (!data) {
21 | return notFound();
22 | }
23 |
24 | return (
25 |
26 | {data.title}
27 | {data.description}
28 | {data.status}
29 | {data.date}
30 |
31 | );
32 | }
33 |
34 | /**
35 | * static version
36 | */
37 | export async function generateStaticParams() {
38 | const tasks = await fetch('http://localhost:3001/api/tasks?limit=1000');
39 | const data: Task[] = await tasks.json();
40 |
41 | return data.map((task) => ({ id: String(task.id) }));
42 | }
43 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/structural/1.adapter.js:
--------------------------------------------------------------------------------
1 | class OldCalc {
2 | operations(value1, value2, operation) {
3 | switch (operation) {
4 | case 'add':
5 | return value1 + value2;
6 | case 'sub':
7 | return value1 - value2;
8 |
9 | default:
10 | return NaN;
11 | }
12 | }
13 | }
14 |
15 | class NewCalc {
16 | add(value1, value2) {
17 | return value1 + value2;
18 | }
19 |
20 | sub(value1, value2) {
21 | return value1 - value2;
22 | }
23 | }
24 |
25 | class CalcAdapter {
26 | constructor() {
27 | this.calc = new NewCalc();
28 | }
29 |
30 | operations(value1, value2, operation) {
31 | switch (operation) {
32 | case 'add':
33 | return this.calc.add(value1, value2);
34 | case 'sub':
35 | return this.calc.sub(value1, value2);
36 |
37 | default:
38 | return NaN;
39 | }
40 | }
41 | }
42 |
43 | const oldCalc = new OldCalc();
44 | console.log(oldCalc.operations(10, 5, 'add'));
45 |
46 | const newCalc = new NewCalc();
47 | console.log(newCalc.add(10, 5));
48 |
49 | const adapterCalc = new CalcAdapter();
50 | console.log(adapterCalc.operations(10, 5, 'add'));
51 | // console.log(adapterCalc.add(10, 5));
52 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/app/get-query-client.ts:
--------------------------------------------------------------------------------
1 | import { QueryClient, defaultShouldDehydrateQuery, isServer } from '@tanstack/react-query';
2 |
3 | function makeQueryClient() {
4 | return new QueryClient({
5 | defaultOptions: {
6 | queries: {
7 | staleTime: Infinity,
8 | },
9 | dehydrate: {
10 | // include pending queries in dehydration
11 | shouldDehydrateQuery: (query) =>
12 | defaultShouldDehydrateQuery(query) || query.state.status === 'pending',
13 | },
14 | },
15 | });
16 | }
17 |
18 | let browserQueryClient: QueryClient | undefined = undefined;
19 |
20 | export function getQueryClient() {
21 | if (isServer) {
22 | // Server: always make a new query client
23 | return makeQueryClient();
24 | } else {
25 | // Browser: make a new query client if we don't already have one
26 | // This is very important, so we don't re-make a new client if React
27 | // suspends during the initial render. This may not be needed if we
28 | // have a suspense boundary BELOW the creation of the query client
29 | if (!browserQueryClient) browserQueryClient = makeQueryClient();
30 | return browserQueryClient;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lectures/18-react-basics/practice/my-app/src/mock/people.js:
--------------------------------------------------------------------------------
1 | const people = [
2 | {
3 | id: 0, // Used in JSX as a key
4 | name: 'Creola Katherine Johnson',
5 | profession: 'mathematician',
6 | accomplishment: 'spaceflight calculations',
7 | imageId: 'MK3eW3A',
8 | },
9 | {
10 | id: 1, // Used in JSX as a key
11 | name: 'Mario José Molina-Pasquel Henríquez',
12 | profession: 'chemist',
13 | accomplishment: 'discovery of Arctic ozone hole',
14 | imageId: 'mynHUSa',
15 | },
16 | {
17 | id: 2, // Used in JSX as a key
18 | name: 'Mohammad Abdus Salam',
19 | profession: 'physicist',
20 | accomplishment: 'electromagnetism theory',
21 | imageId: 'bE7W1ji',
22 | },
23 | {
24 | id: 3, // Used in JSX as a key
25 | name: 'Percy Lavon Julian',
26 | profession: 'chemist',
27 | accomplishment:
28 | 'pioneering cortisone drugs, steroids and birth control pills',
29 | imageId: 'IOjWm71',
30 | },
31 | {
32 | id: 4, // Used in JSX as a key
33 | name: 'Subrahmanyan Chandrasekhar',
34 | profession: 'astrophysicist',
35 | accomplishment: 'white dwarf star mass calculations',
36 | imageId: 'lrWQx8l',
37 | },
38 | ];
39 |
40 | export {people};
41 |
--------------------------------------------------------------------------------
/workshops/state-management-react/tanstack-query/src/components/OrdersContainer/index.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 |
3 | import { Orders } from '@/components';
4 | import { getOrders } from '@/services/orders';
5 | import { useInfiniteQuery } from '@tanstack/react-query';
6 |
7 | const OrdersContainer = () => {
8 | const { data, fetchNextPage, isLoading, isFetching, ...rest } = useInfiniteQuery({
9 | queryKey: ['orders'],
10 | enabled: false,
11 | initialPageParam: 0,
12 | queryFn: async ({ pageParam = 0 }) => await getOrders(pageParam),
13 | getPreviousPageParam: (_, allPages) => {
14 | return allPages.length - 1 || 0;
15 | },
16 | getNextPageParam: (_, allPages) => {
17 | return allPages.length || 0;
18 | },
19 | });
20 |
21 | console.log('rest', rest);
22 |
23 | return (
24 | {}}
27 | isLoading={isLoading}
28 | orders={data?.pages?.flat() || []}
29 | selectedOrders={[]}
30 | isFetching={isFetching}
31 | onLoadMoreButtonClick={fetchNextPage}
32 | onSelectOrder={() => {}}
33 | onDeleteSelectedOrder={() => {}}
34 | />
35 | );
36 | };
37 |
38 | export default OrdersContainer;
39 |
--------------------------------------------------------------------------------
/lectures/05-css-advanced/practice/css-animations/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CSS Animations
6 |
7 |
8 |
9 | 1. Animation Name & @keyframes
10 |
11 |
12 | 2. Animation Duration (3s)
13 |
14 |
15 | 3. Animation Timing Function (ease-in-out)
16 |
17 |
18 | 4. Animation Delay (1s)
19 |
20 |
21 | 5. Animation Iteration Count (3)
22 |
23 |
24 | 6. Animation Direction (alternate)
25 |
26 |
27 | 7. Animation Fill Mode (forwards)
28 |
29 |
30 | 8. Animation Play State (running/paused)
31 |
32 | Hover over the box to pause the animation.
33 |
34 | 9. Multiple Animations
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/events/script.js:
--------------------------------------------------------------------------------
1 | const testBtn = document.querySelector('#test-btn');
2 |
3 | const clickHandler = (e) => {
4 | console.log(e.target);
5 | };
6 |
7 | // testBtn.addEventListener('click', clickHandler);
8 | // testBtn.addEventListener('click', clickHandler);
9 | // testBtn.removeEventListener('click', clickHandler);
10 |
11 | const btn = document.querySelector('#button');
12 | const divOuter = document.querySelector('.div-outer');
13 | const divInner = document.querySelector('.div-inner');
14 | const p = document.querySelector('p');
15 |
16 | divOuter.addEventListener('click', () => console.log('div outer CLICK'), {
17 | capture: true,
18 | });
19 | divInner.addEventListener('click', () => console.log('div inner CLICK'));
20 | p.addEventListener('click', () => console.log('p CLICK'));
21 | btn.addEventListener('click', (e) => {
22 | // e.stopPropagation();
23 | console.log('BUTTON CLICK');
24 | });
25 |
26 | // divOuter.addEventListener('contextmenu', () =>
27 | // console.log('div outer mouseup')
28 | // );
29 |
30 | btn.addEventListener('contextmenu', () => console.log('contextmenu'));
31 |
32 | // e.preventDefault(); // Cancel the native event
33 | // e.stopPropagation(); // Don't bubble/capture the event any further
34 |
--------------------------------------------------------------------------------
/lectures/09-js-advanced-2/README.md:
--------------------------------------------------------------------------------
1 | # JS Advanced 2
2 |
3 | Here's you can find materials about JS Advanced 2
4 |
5 | [Presentation](https://docs.google.com/presentation/d/1mbGn0rp4vuFxBpK61h9Egv9ag7X2KGSRXrp8ZrZmtmo/edit?usp=sharing)
6 |
7 | [Video 1](https://solvdportal-my.sharepoint.com/personal/laba_solvd_com/_layouts/15/stream.aspx?id=%2Fpersonal%2Flaba%5Fsolvd%5Fcom%2FDocuments%2FRecordings%2FDevelopment%2DReact%2Ejs%2D2025%2D01%2D20250404%5F150537%2DMeeting%20Recording%2Emp4&referrer=StreamWebApp%2EWeb&referrerScenario=AddressBarCopied%2Eview%2Ed5da6221%2Dd1a7%2D4870%2D906a%2D5d2f8bfc87f2)
8 |
9 | [Video 2](https://solvdportal-my.sharepoint.com/personal/laba_solvd_com/_layouts/15/stream.aspx?id=%2Fpersonal%2Flaba%5Fsolvd%5Fcom%2FDocuments%2FRecordings%2FDevelopment%2DReact%2Ejs%2D2025%2D01%2D20250404%5F153022%2DMeeting%20Recording%2Emp4&referrer=StreamWebApp%2EWeb&referrerScenario=AddressBarCopied%2Eview%2Ed1e51ec9%2D51c9%2D4762%2D9f52%2Dc2e74e7f8a0f)
10 |
11 | Useful links
12 |
13 | - [Object properties configuration](https://javascript.info/object-properties)
14 | - [Prototypes, inheritance](https://javascript.info/prototypes)
15 | - [Classes](https://javascript.info/classes)
16 | - [Storing data in the browser](https://javascript.info/data-storage)
17 |
--------------------------------------------------------------------------------
/lectures/11-js-dom/practice/practice-1/script/7-events.js:
--------------------------------------------------------------------------------
1 | // const testBtn = document.querySelector('#test-btn');
2 |
3 | // const clickHandler = e => {
4 | // console.log(e.target);
5 | // };
6 |
7 | // testBtn.addEventListener('click', clickHandler);
8 |
9 | // testBtn.addEventListener('click', clickHandler);
10 | // testBtn.removeEventListener('click', clickHandler);
11 |
12 | // const btn = document.querySelector('#button');
13 | // const divOuter = document.querySelector('.div-outer');
14 | // const divInner = document.querySelector('.div-inner');
15 | // const p = document.querySelector('p');
16 |
17 | // divOuter.addEventListener('click', () => console.log('div outer CLICK'));
18 | // divOuter.addEventListener('contextmenu', () => console.log('div outer mouseup'));
19 | // divInner.addEventListener('click', () => console.log('div inner CLICK'));
20 | // p.addEventListener('click', () => console.log('p CLICK'));
21 | // btn.addEventListener('click', e => {
22 | // // e.stopPropagation();
23 | // console.log('BUTTON CLICK');
24 | // });
25 | // btn.addEventListener('contextmenu', () => console.log('p mouseup'));
26 |
27 | // e.preventDefault(); // Cancel the native event
28 | // e.stopPropagation(); // Don't bubble/capture the event any further
29 |
--------------------------------------------------------------------------------
/lectures/10-js-advanced-3/practice/async-await.js:
--------------------------------------------------------------------------------
1 | // function fetchData() {
2 | // return new Promise((resolve, reject) => {
3 | // setTimeout(() => {
4 | // Math.random() > 0.5
5 | // ? resolve("Data fetched!")
6 | // : reject("Error fetching data");
7 | // }, 1000);
8 | // });
9 | // }
10 |
11 | // fetchData()
12 | // .then((data) => {
13 | // console.log(data);
14 | // })
15 | // .catch((error) => {
16 | // console.error(error);
17 | // });
18 |
19 | // async function fetchDataWithAsyncAwait() {
20 | // try {
21 | // const data = await fetchData();
22 | // console.log(data);
23 | // } catch (error) {
24 | // console.error(error);
25 | // }
26 | // }
27 |
28 |
29 | // fetchDataWithAsyncAwait();
30 |
31 | // async function getData() {
32 | // const url = "https://jsonplaceholder.typicode.com/todos/1";
33 | // try {
34 | // const response = await fetch(url, {
35 |
36 | // });
37 | // if (!response.ok) {
38 | // throw new Error(`Response status: ${response.status}`);
39 | // }
40 |
41 | // const json = await response.json();
42 | // console.log(json);
43 | // } catch (error) {
44 | // console.error(error.message);
45 | // }
46 | // }
47 |
48 | // getData();
49 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/calculator-test-jest/calculator.test.js:
--------------------------------------------------------------------------------
1 | const {add, subtract, multiply, divide} = require('./calculator');
2 |
3 | describe('valid additions', () => {
4 | test('1 + 1 = 2', () => {
5 | expect(add(1, 1)).toEqual(2)
6 | });
7 |
8 | test('10 + 20 = 30', () => {
9 | expect(add(10, 20)).toEqual(30)
10 | });
11 | });
12 |
13 | describe('valid subtractions', () => {
14 | test('10 - 2 = 8', () => {
15 | expect(subtract(10, 2)).toEqual(8)
16 | });
17 |
18 | test('87 - 523 = -436', () => {
19 | expect(subtract(87, 523)).toEqual(-436)
20 | });
21 | });
22 |
23 | describe('valid multiplications', () => {
24 | test('2 * 4 = 8', () => {
25 | expect(multiply(2, 4)).toEqual(8)
26 | });
27 |
28 | test('1000 * 8.5 = 8500', () => {
29 | expect(multiply(1000, 8.5)).toEqual(8500)
30 | });
31 | });
32 |
33 | describe('valid divisions', () => {
34 | test('20 / 2 = 10', () => {
35 | expect(divide(20, 2)).toEqual(10)
36 | });
37 |
38 | test('99 / 9 = 11', () => {
39 | expect(divide(99, 9)).toEqual(11)
40 | });
41 | });
42 |
43 | describe('divison error cases', () => {
44 | test('20 / 0 throws', () => {
45 | expect(() => {
46 | expect(divide(20, 0))
47 | }).toThrow()
48 | });
49 | });
50 |
--------------------------------------------------------------------------------
/lectures/13-environment-and-preprocessors/README.md:
--------------------------------------------------------------------------------
1 | # Environment & CSS Preprocessors
2 |
3 | Here's you can find materials about "Environment & CSS Preprocessors"
4 |
5 | [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/EeJjudZ_9fhJilxJl7p8jc0BKmJ5EF3OvO61ZFj5mbw7Xg?e=D3RiTr)
6 |
7 | [Video](https://solvdportal-my.sharepoint.com/:v:/r/personal/laba_solvd_com/Documents/Recordings/Development-React.js-2025-01-20250418_140244-Meeting%20Recording.mp4?csf=1&web=1&e=LwfP8O&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D)
8 |
9 | Useful links
10 |
11 | - [A Complete Beginner’s Guide to npm](https://css-tricks.com/a-complete-beginners-guide-to-npm/)
12 | - [What is npm?](https://www.javascripttutorial.net/nodejs-tutorial/what-is-npm/)
13 | - [Yarn vs NPM](https://phoenixnap.com/kb/yarn-vs-npm)
14 | - [What is a CSS Preprocessor?](https://blog.mazarin.lk/css_reprocessors/)
15 | - [Node Version Manager](https://www.keycdn.com/blog/node-version-manager)
16 | - [The Complete JavaScript Module Bundlers Guide](https://snipcart.com/blog/javascript-module-bundler)
17 | - [Semantic versioning and npm](https://youtu.be/kK4Meix58R4)
18 |
--------------------------------------------------------------------------------
/lectures/03-html-basics/README.md:
--------------------------------------------------------------------------------
1 | # HTML Basics
2 |
3 | Here's you can find materials about HTML
4 |
5 | [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/EQpQfAfVP1xEnC1ZVgvuVzIBlFmzoW21vUKm6a4Ak8kh-Q?e=Y6kkoQ)
6 |
7 | [Video](https://solvdportal-my.sharepoint.com/:v:/r/personal/laba_solvd_com/Documents/Recordings/Development-React.js-2025-01-20250225_140156-Meeting%20Recording.mp4?csf=1&web=1&e=Pyoz9d&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D)
8 |
9 | Useful links
10 |
11 | - [Emmet syntax](https://docs.emmet.io/abbreviations/syntax/)
12 | - [W3Schools: Learn HTML](https://www.w3schools.com/html/html_intro.asp)
13 | - [How To Write Semantic HTML](https://hackernoon.com/how-to-write-semantic-html-dkq3ulo)
14 | - [HTML CheatSheet](https://www.geeksforgeeks.org/html-cheat-sheet-a-basic-guide-to-html)
15 | - [Visual guide to HTML](https://htmlreference.io/)
16 | - [Learn Forms](https://web.dev/learn/forms/)
17 | - [SEO](https://developers.google.com/search/docs)
18 | - [Accessibility Tutorial](https://www.w3schools.com/accessibility/index.php)
19 | - [HTML Tags for SEO](https://www.greengeeks.com/blog/html-tags-for-seo/)
20 |
--------------------------------------------------------------------------------
/workshops/state-management-react/pure-redux-example/src/pages/_app.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import Head from 'next/head';
3 | import { ThemeProvider } from '@mui/material/styles';
4 | import CssBaseline from '@mui/material/CssBaseline';
5 | import { CacheProvider } from '@emotion/react';
6 | import theme from '@/styles/theme';
7 | import createEmotionCache from '@/common/mui/createCache';
8 | import { Provider } from 'react-redux';
9 | import { store, wrapper } from '@/store/store';
10 |
11 | // Client-side cache, shared for the whole session of the user in the browser.
12 | const clientSideEmotionCache = createEmotionCache();
13 |
14 | function MyApp(props) {
15 | const { Component, emotionCache = clientSideEmotionCache, pageProps } = props;
16 | return (
17 |
18 |
19 |
20 |
21 |
22 |
23 | {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
24 |
25 |
26 |
27 |
28 |
29 | );
30 | }
31 |
32 | export default wrapper.withRedux(MyApp);
33 |
--------------------------------------------------------------------------------
/lectures/25-testing/README.md:
--------------------------------------------------------------------------------
1 | # Testing
2 |
3 | Here's you can find materials about "Testing"
4 |
5 | [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/EemihoYrBRRFn6wudTNreKUBiSxX2znUSV3Y3QaL7TeH9A?e=AgGL35)
6 |
7 | [Video](https://solvdportal-my.sharepoint.com/:v:/r/personal/laba_solvd_com/Documents/Recordings/Development-React.js-2025-01-20250613_140124-Meeting%20Recording.mp4?csf=1&web=1&e=I7GqtP&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D)
8 |
9 | Useful links
10 |
11 | - [Testing Overview](https://reactjs.org/docs/testing.html)
12 | - [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/)
13 | - [Jest](https://jestjs.io/)
14 | - [An Overview of JavaScript Testing in 2022](https://medium.com/welldone-software/an-overview-of-javascript-testing-7ce7298b9870)
15 | - [What are Unit Testing, Integration Testing and Functional Testing?](https://codeutopia.net/blog/2015/04/11/what-are-unit-testing-integration-testing-and-functional-testing/)
16 | - [Jest Tutorial](https://www.softwaretestinghelp.com/jest-testing-tutorial/)
17 | - [React Testing Library Tutorial](https://www.robinwieruch.de/react-testing-library/)
18 |
--------------------------------------------------------------------------------
/lectures/17-patterns/practice/behaviour/5.mediator.js:
--------------------------------------------------------------------------------
1 | class OfficialDealer {
2 | constructor() {
3 | this.customers = [];
4 | }
5 |
6 | orderAuto(customer, auto, info) {
7 | const name = customer.getName();
8 | console.log(`Order name: ${name}. Order auto is ${auto}`);
9 | console.log(`Additional info: ${info}`);
10 | this.addToCustomerList(name);
11 | }
12 |
13 | addToCustomerList(name) {
14 | this.customers.push(name);
15 | }
16 |
17 | getCustomerList() {
18 | return this.customers;
19 | }
20 | }
21 |
22 | class DiffDealer extends OfficialDealer {}
23 |
24 | class Customer {
25 | constructor(name, dealerMediator) {
26 | this.name = name;
27 | this.dealerMediator = dealerMediator;
28 | }
29 |
30 | getName() {
31 | return this.name;
32 | }
33 |
34 | makeOrder(auto, info) {
35 | this.dealerMediator.orderAuto(this, auto, info);
36 | }
37 | }
38 |
39 | const mediator = new OfficialDealer();
40 | const mediatorSecond = new DiffDealer();
41 |
42 | const misha = new Customer('Misha', mediator);
43 | const dima = new Customer('Dima', mediator);
44 | const bruno = new Customer('Dima', mediatorSecond);
45 |
46 | misha.makeOrder('Tesla', 'With autopilot');
47 | dima.makeOrder('BMW', '320 hourses');
48 | bruno.makeOrder('BMW', '320 hourses');
49 |
50 | console.log(mediator.getCustomerList());
51 |
--------------------------------------------------------------------------------
/workshops/state-management-react/README.md:
--------------------------------------------------------------------------------
1 | # React State Management Workshop
2 |
3 | - [Video](https://teams.microsoft.com/l/meetingrecap?driveId=b%21fu09rKVbAkanFRzm-tf8OCSUMJvEDuxEtpYUx6qyIQc-AEKVh3x5SojtBIKDO9qU&driveItemId=01ZKRGP5BFYQ3AENOS3FD27BUOMPKD4KMX&sitePath=https%3A%2F%2Fsolvdportal-my.sharepoint.com%2F%3Av%3A%2Fg%2Fpersonal%2Flaba_solvd_com%2FESXENgI10tlHr4aOY9Q-KZcByouSlmi1htdc7x-jfZ_PvA&fileUrl=https%3A%2F%2Fsolvdportal-my.sharepoint.com%2F%3Av%3A%2Fg%2Fpersonal%2Flaba_solvd_com%2FESXENgI10tlHr4aOY9Q-KZcByouSlmi1htdc7x-jfZ_PvA&iCalUid=040000008200E00074C5B7101A82E00807E90611E753002BCCC8DB01000000000000000010000000001CF1AC3404E34780A05202880E4E3F&masterICalUid=040000008200E00074C5B7101A82E00800000000E753002BCCC8DB01000000000000000010000000001CF1AC3404E34780A05202880E4E3F&threadId=19%3Ameeting_NDc0YTQzNDAtN2FiYi00MjMzLWEzMmEtMWQ2NWM5MjQ4NmNl%40thread.v2&organizerId=9894d351-68d8-42d0-95d8-aa5f16e30e40&tenantId=5fd90985-f406-47a0-9043-89ffdca38307&callId=002905b2-fcb6-40ac-9b46-1e0a4695b281&threadType=Meeting&meetingType=Recurring&subType=RecapSharingLink_RecapChiclet)
4 | - [Presentation](https://solvdportal.sharepoint.com/:p:/s/GoogleDriveSolvdLABA/EXl19DxUGm5DvAxY8ex6E2cBjN2cizF3TEDUmb627NmX7w?e=m8dt9B)
5 |
6 | React query doc - https://tanstack.com/query/v4/docs/react/overview
7 | RTK doc - https://redux-toolkit.js.org/
8 |
--------------------------------------------------------------------------------
/lectures/22-nextjs-1/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const cors = require('cors');
3 |
4 | const tasks = require('./tasks.json');
5 |
6 | const app = express();
7 | const port = 3001;
8 |
9 | const getRandomTasks = (limit = 10) => {
10 | return tasks.sort(() => Math.random() - 0.5).slice(0, limit);
11 | };
12 |
13 | // Middleware
14 | app.use(cors());
15 | app.use(express.json());
16 |
17 | app.use((req, res, next) => {
18 | console.log(`${req.url} - Date: ${new Date().toISOString()}`);
19 | next();
20 | });
21 |
22 | // GET all tasks
23 | app.get('/api/tasks', (req, res) => {
24 | const limit = req.query.limit ? parseInt(req.query.limit) : 10;
25 |
26 | res.json(getRandomTasks(limit));
27 | });
28 |
29 | app.get('/api/tasks/:id', (req, res) => {
30 | const task = tasks.find((t) => t.id === Number(req.params.id));
31 |
32 | if (!task) {
33 | return res.status(404).json({ message: 'Task not found' });
34 | }
35 |
36 | res.json(task);
37 | });
38 |
39 | // GET single task
40 | app.get('/api/tasks/:id', (req, res) => {
41 | const task = tasks.find((t) => t.id === parseInt(req.params.id));
42 | if (!task) return res.status(404).json({ message: 'Task not found' });
43 | res.json(task);
44 | });
45 |
46 | app.listen(port, () => {
47 | console.log(`Server is running on port ${port}`);
48 | });
49 |
--------------------------------------------------------------------------------
/lectures/25-testing/practice/calculator-test-jest/coverage/clover.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
|