This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useEffect } from "react"; | |
| function App() { | |
| const [count, setCount] = useState(0); | |
| useEffect(() => { | |
| setInterval(() => setCount(state => state + 1), 1000); | |
| }, []); | |
| return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "workbench.colorTheme": "Dracula", | |
| "workbench.iconTheme": "material-icon-theme", | |
| "editor.fontSize": 12, | |
| "editor.fontFamily": "Fira Code", | |
| "editor.fontLigatures": true, | |
| "eslint.validate": [ | |
| "javascript", | |
| "javascriptreact", | |
| "typescript", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { PureComponent } from "react"; | |
| import "./styles.css"; | |
| export default class Class extends PureComponent { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| name: "Zagatti", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { PureComponent } from "react"; | |
| import "./styles.css"; | |
| export default class Class extends PureComponent { | |
| state = { | |
| name: "Zagatti", | |
| count: 0 | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useEffect, memo } from "react"; | |
| import "./styles.css"; | |
| function Hooks() { | |
| const [name, setName] = useState("Zagatti"); | |
| const [count, setCount] = useState(0); | |
| useEffect(() => { | |
| document.title = `${name}'s counter`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useState } from "react"; | |
| export default function useCount() { | |
| const [count, setCount] = useState(0); | |
| function increment() { | |
| setCount(state => state + 1); | |
| } | |
| function decrement() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useEffect, memo } from "react"; | |
| import useCount from "../hooks/useCount"; | |
| import "./styles.css"; | |
| function Hooks() { | |
| const [name, setName] = useState("Zagatti"); | |
| const { count, increment, decrement } = useCount(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdlib.h> | |
| struct Node { | |
| int data; | |
| struct Node *next; | |
| }; | |
| void printList(struct Node *start) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| **/*.js | |
| node_modules | |
| build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -d --name postgresql -e POSTGRESQL_PASSWORD=my_password -e POSTGRESQL_USERNAME=my_user -e POSTGRESQL_DATABASE=my_db -p random_port:5432 bitnami/postgresql:latest | |
| docker run -d --name mongodb -e MONGODB_USERNAME=my_user -e MONGODB_PASSWORD=my_password -e MONGODB_DATABASE=my_db -p random_port:27017 bitnami/mongodb:latest | |
| docker run -d --name redis -e REDIS_PASSWORD=my_password -p random_port:6379 bitnami/redis:latest |