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 { useActionState } from "react"; | |
| const addTodo = async (todoDetails) => { | |
| const response = await fetch("https://dummyjson.com/todos/add", { | |
| method: "POST", | |
| headers: { "Content-Type": "application/json" }, | |
| body: JSON.stringify(todoDetails), | |
| }); | |
| return response.json(); | |
| }; |
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 } from 'react'; | |
| export function Form() { | |
| const [formData, setFormData] = useState({ | |
| username: '', | |
| password: '', | |
| errors: [], | |
| loading: false, | |
| }); |
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 from "react"; | |
| import ReactDOM from "react-dom/client"; | |
| import { Skeleton } from "@progress/kendo-react-indicators"; | |
| import { | |
| Avatar, | |
| Card, | |
| CardTitle, | |
| CardSubtitle, | |
| CardHeader, | |
| CardImage, |
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 from "react"; | |
| import ReactDOM from "react-dom/client"; | |
| import { Skeleton } from "@progress/kendo-react-indicators"; | |
| import { | |
| Avatar, | |
| Card, | |
| CardTitle, | |
| CardSubtitle, | |
| CardHeader, | |
| CardImage, |
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 from "react"; | |
| import { useTable, useSortBy, useRowSelect } from "react-table"; | |
| function App() { | |
| const columns = React.useMemo( | |
| () => [ | |
| { | |
| Header: "Name", | |
| accessor: "name" | |
| }, |
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 from "react"; | |
| import ReactDOM from "react-dom/client"; | |
| import { | |
| Map, | |
| MapLayers, | |
| MapTileLayer, | |
| MapMarkerLayer, | |
| MapBubbleLayer, | |
| } from "@progress/kendo-react-map"; | |
| import "./index.scss"; |
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 { createApp } from "vue"; | |
| import App from "./App.vue"; | |
| import store from "./store"; | |
| createApp(App).use(store).mount("#app"); |
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 { createStore } from "vuex"; | |
| export default createStore({ | |
| state | |
| mutations | |
| actions | |
| getters | |
| }); |
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 { reactive } from "vue"; | |
| export const store = { | |
| state: reactive({ | |
| numbers: [1, 2, 3] | |
| }), | |
| addNumber(newNumber) { | |
| this.state.numbers.push(newNumber); | |
| } | |
| }; |
NewerOlder