mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Add missing copyright headers
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { createContext, useRef, useReducer, useContext } from "react";
|
||||
import "./styles.css";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { createContext, useRef, useReducer, useContext } from "react";
|
||||
import "./styles.css";
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import{useMemoCache}from"./useMemoCache";import React,{createContext,useRef,useReducer,useContext}from"react";import"./styles.css";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";const initialStore={left:void 0,right:void 0},reducer=(e,t)=>{switch(t.tag){case"left":return{...e,left:t.payload};case"right":return{...e,right:t.payload};default:return e}},BinaryContext=createContext(initialStore);function Input(e){let t=useMemoCache(2);var a=t[0],s=!a||a!==e;s&&(t[0]=e);var r=s&&a.value!==e.value,a=s&&a.onChange!==e.onChange;return r||a?t[1]=_jsx("input",{className:"Search",placeholder:"...",value:e.value,onChange:e.onChange}):t[1]}function Left(){let e=useMemoCache(9);const[{left:t},a]=useContext(BinaryContext);var s=e[2]!==a;s&&(e[2]=a);var r=e[1]!==t;r&&(e[1]=t);const n=useRef(0);return r||s?e[8]=_jsxs("div",{className:"column Demo2",children:[r||s?e[5]=_jsxs("header",{className:"Header row",children:[_jsx("div",{className:"Icon",children:"⚛️"}),r||s?e[4]=_jsx(Input,{value:t,onChange:s?e[3]=e=>a({tag:"left",payload:e.target.value}):e[3]}):e[4]]}):e[5],r?e[7]=_jsxs("div",{className:"Feed",children:[_jsx("h3",{children:n.current++}),r?e[6]=_jsx("div",{className:"FeedItem",children:t}):e[6]]}):e[7]]}):e[8]}function Right(){let e=useMemoCache(9);const[{right:t},a]=useContext(BinaryContext);var s=e[2]!==a;s&&(e[2]=a);var r=e[1]!==t;r&&(e[1]=t);const n=useRef(0);return r||s?e[8]=_jsxs("div",{className:"column Demo2",children:[r||s?e[5]=_jsxs("header",{className:"Header row",children:[_jsx("div",{className:"Icon",children:"⚛️"}),r||s?e[4]=_jsx(Input,{value:t,onChange:s?e[3]=e=>a({tag:"right",payload:e.target.value}):e[3]}):e[4]]}):e[5],r?e[7]=_jsxs("div",{className:"Feed",children:[_jsx("h3",{children:n.current++}),r?e[6]=_jsx("div",{className:"FeedItem",children:t}):e[6]]}):e[7]]}):e[8]}export default function Demo2(){let e=useMemoCache(4);var[t,a]=useReducer(reducer,initialStore),s=e[1]!==t;s&&(e[1]=t);a=s?e[2]=[t,a]:e[2];return s?e[3]=_jsx(BinaryContext.Provider,{value:a,children:_jsxs("div",{className:"App",children:[_jsx("h2",{children:"Demo2 - Context"}),_jsxs("div",{className:"row",children:[_jsx(Left,{}),_jsx(Right,{})]})]})}):e[3]}
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React,{createContext,useRef,useReducer,useContext}from"react";import"./styles.css";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";const initialStore={left:void 0,right:void 0},reducer=(e,t)=>{switch(t.tag){case"left":return{...e,left:t.payload};case"right":return{...e,right:t.payload};default:return e}},BinaryContext=createContext(initialStore);function Input({value:e,onChange:t}){return _jsx("input",{className:"Search",placeholder:"...",value:e,onChange:t})}function Left(){const[{left:e},t]=useContext(BinaryContext),s=useRef(0);return _jsxs("div",{className:"column Demo2",children:[_jsxs("header",{className:"Header row",children:[_jsx("div",{className:"Icon",children:"⚛️"}),_jsx(Input,{value:e,onChange:e=>t({tag:"left",payload:e.target.value})})]}),_jsxs("div",{className:"Feed",children:[_jsx("h3",{children:s.current++}),_jsx("div",{className:"FeedItem",children:e})]})]})}function Right(){const[{right:e},t]=useContext(BinaryContext),s=useRef(0);return _jsxs("div",{className:"column Demo2",children:[_jsxs("header",{className:"Header row",children:[_jsx("div",{className:"Icon",children:"⚛️"}),_jsx(Input,{value:e,onChange:e=>t({tag:"right",payload:e.target.value})})]}),_jsxs("div",{className:"Feed",children:[_jsx("h3",{children:s.current++}),_jsx("div",{className:"FeedItem",children:e})]})]})}export default function Demo2(){var[e,t]=useReducer(reducer,initialStore),t=[e,t];return _jsx(BinaryContext.Provider,{value:t,children:_jsxs("div",{className:"App",children:[_jsx("h2",{children:"Demo2 - Context"}),_jsxs("div",{className:"row",children:[_jsx(Left,{}),_jsx(Right,{})]})]})})}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useRef } from "react";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { jsxs as _jsxs } from "react/jsx-runtime";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useRef } from "react";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import{useMemoCache}from"./useMemoCache";import React,{useRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function FeedItem(e){let t=useMemoCache(2);var r=t[0],a=!r||r!==e;a&&(t[0]=e);var s=a&&r.data!==e.data,r=a&&r.onClick!==e.onClick;const m=useRef(0);return s||r?t[1]=_jsx("a",{href:`./item/${e.data.value}`,className:"FeedItem",onClick:e.onClick,children:m.current++}):t[1]}function Feed(e){let t=useMemoCache(3);var r=t[0],a=!r||r!==e;a&&(t[0]=e);r=a&&r.items!==e.items;const s=useRef(0),m=t[1]||(t[1]=e=>{e.preventDefault(),alert(e.target.href)});return r?t[2]=_jsxs("div",{className:"Feed",children:[_jsx("h3",{children:s.current++}),e.items.map((e,t)=>_jsx(FeedItem,{data:e,onClick:m},t))]}):t[2]}export{FeedItem,Feed};
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useRef, useCallback } from "react";
|
||||
import { jsx as _jsx } from "react/jsx-runtime";
|
||||
import { jsxs as _jsxs } from "react/jsx-runtime";
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React,{useRef,useCallback}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function FeedItem({data:e,onClick:t}){const r=useRef(0);return _jsx("a",{href:`./item/${e.value}`,className:"FeedItem",onClick:t,children:r.current++})}const FeedItemMemoized=React.memo(FeedItem),Feed=React.memo(({items:e})=>{const t=useRef(0),r=useCallback(e=>{e.preventDefault(),alert(e.target.href)},[]);return _jsxs("div",{className:"Feed",children:[_jsx("h3",{children:t.current++}),e.map((e,t)=>_jsx(FeedItemMemoized,{data:e,onClick:r},t))]})});export{Feed};
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React,{useRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function FeedItem({data:e,onClick:t}){const r=useRef(0);return _jsx("a",{href:`./item/${e.value}`,className:"FeedItem",onClick:t,children:r.current++})}function Feed({items:e}){const t=useRef(0),r=e=>{e.preventDefault(),alert(e.target.href)};return _jsxs("div",{className:"Feed",children:[_jsx("h3",{children:t.current++}),e.map((e,t)=>_jsx(FeedItem,{data:e,onClick:r},t))]})}export{FeedItem,Feed};
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Demo1 from "./Demo1";
|
||||
import Demo1Forget from "./Demo1.forget.js";
|
||||
import Demo2 from "./Demo2";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState } from "react";
|
||||
import "./styles.css";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState } from "react";
|
||||
import "./styles.css";
|
||||
import * as Feed from "./Feed";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { createContext, useRef, useReducer, useContext } from "react";
|
||||
import "./styles.css";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { createContext, useRef, useReducer, useContext } from "react";
|
||||
import "./styles.css";
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useRef } from "react";
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useRef } from "react";
|
||||
|
||||
function FeedItem({ data, onClick }) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useRef, useCallback } from "react";
|
||||
|
||||
function FeedItem({ data, onClick }) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { StrictMode } from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useRef } from "react";
|
||||
|
||||
const placeholder = NaN;
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState } from "react";
|
||||
export default function AddTodo({
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import getUpdated from "../utils/getUpdated";
|
||||
import getFiltered from "../utils/getFiltered";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
import CountBadge from "../utils/CountBadge";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useRef } from "react";
|
||||
|
||||
const placeholder = NaN;
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// In production, we register a service worker to serve assets from local cache.
|
||||
|
||||
// This lets the app load faster on subsequent visits in production, and gives
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { StrictMode } from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import "./normalize.css";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState } from "react";
|
||||
|
||||
export default function AddTodo({ setTodos, themeColor = "#045975" }) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import getUpdated from "../utils/getUpdated";
|
||||
import getFiltered from "../utils/getFiltered";
|
||||
import initialTodos from "../utils/InitialTodos";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef } from "react";
|
||||
import CountBadge from "../utils/CountBadge";
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
export default function ColorPicker({ value, onChange }) {
|
||||
return (
|
||||
<input
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { forwardRef } from "react";
|
||||
|
||||
// Capped to 3 digits
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const initialTodos = [
|
||||
{ id: 0, text: "memo", done: true },
|
||||
{ id: 1, text: "useCallback", done: false },
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
export default function Select({ value, options, onChange }) {
|
||||
return (
|
||||
<div className="Select">
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
function delay() {
|
||||
let now = performance.now();
|
||||
while (performance.now() - now < 16) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
export default function getUpdated(tasks, newTodo) {
|
||||
return tasks
|
||||
.map(t => {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
"use forget";
|
||||
import React, { useState } from "react";
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
"use forget";
|
||||
import getUpdated from "../utils/getUpdated";
|
||||
import getFiltered from "../utils/getFiltered";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
"use forget";
|
||||
import React, { useState, useRef } from "react";
|
||||
import CountBadge from "../utils/CountBadge";
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import "../styles/normalize.css";
|
||||
import "../styles/styles.css";
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
|
||||
export default function handler(req, res) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import BlazingTodoList from "../components/BlazingTodoList";
|
||||
|
||||
export default function Home() {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
export default function ColorPicker({ value, onChange }) {
|
||||
return (
|
||||
<input
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { forwardRef } from "react";
|
||||
|
||||
// Capped to 3 digits
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const initialTodos = [
|
||||
{ id: 0, text: "memo", done: true },
|
||||
{ id: 1, text: "useCallback", done: false },
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
export default function Select({ value, options, onChange }) {
|
||||
return (
|
||||
<div className="Select">
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
function delay() {
|
||||
let now = performance.now();
|
||||
while (performance.now() - now < 16) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
export default function getUpdated(tasks, newTodo) {
|
||||
return tasks
|
||||
.map(t => {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useRef } from "react";
|
||||
|
||||
const REACT_MEMOCACHE_SENTINEL = Symbol.for('react.memocache_sentinel');
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
export default function ColorPicker({ value, onChange }) {
|
||||
return (
|
||||
<input
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { forwardRef } from "react";
|
||||
|
||||
// Capped to 3 digits
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
export default function Select({ value, options, onChange }) {
|
||||
return (
|
||||
<div className="Select">
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// In production, we register a service worker to serve assets from local cache.
|
||||
|
||||
// This lets the app load faster on subsequent visits in production, and gives
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { createContext, useState, useRef, useContext } from "react";
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
import { TasksProvider, useTasks, useTasksDispatch } from "./TaskBoardContext";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { createContext, useContext, useState, useRef } from "react";
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
const initialTasks = [{
|
||||
id: 0,
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef, useEffect } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState } from "react"; // We need this because Forget has bug when props is passed in `undefined`
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState } from "react";
|
||||
export default function AddTodo(props) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState } from "react"; // We need this because Forget has bug when props is passed in `undefined`
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState } from "react";
|
||||
export default function AddTodo(props) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
import CountBadge from "../Components/CountBadge";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
import CountBadge from "../Components/CountBadge";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
import CountBadge from "../Components/CountBadge";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import React, { useState, useRef } from "react";
|
||||
import CountBadge from "../Components/CountBadge";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
import { createContext, useContext, useReducer } from "react";
|
||||
const TasksContext = createContext(null);
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
function delay() {
|
||||
let now = performance.now();
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
// Update an array in an immutable manner.
|
||||
export default function getUpdated(todos, newTodo) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useMemoCache } from "./useMemoCache";
|
||||
const initialTodos = [{
|
||||
id: 0,
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { useRef } from "react";
|
||||
|
||||
const placeholder = NaN;
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { StrictMode, useEffect, useState } from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import "./normalize.css";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef } from "react";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useCallback, useState, useRef } from "react";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef, useCallback } from "react";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef } from "react";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef, useCallback, useMemo } from "react";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { createContext, useState, useRef, useContext } from "react";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef } from "react";
|
||||
import { TasksProvider, useTasks, useTasksDispatch } from "./TaskBoardContext";
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { createContext, useContext, useState, useRef } from "react";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const initialTasks = [
|
||||
{ id: 0, text: "memo", done: true },
|
||||
{ id: 1, text: "useCallback", done: false },
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
import initialTodos from "./initialTodos";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
import initialTodos from "./initialTodos";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useCallback } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
import initialTodos from "./initialTodos";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef, useCallback } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
import initialTodos from "./initialTodos";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
import initialTodos from "./initialTodos";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef, useCallback } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
import getFiltered from "./getFiltered";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef, useEffect } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
import getFiltered from "./getFiltered";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef, useCallback, useMemo } from "react";
|
||||
import getUpdated from "./getUpdated";
|
||||
import getFiltered from "./getFiltered";
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// magic variables + memoCache
|
||||
function TodoList1({ visibility, themeColor }) {
|
||||
const [todos, setTodos] = useState(initialTodos);
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState } from "react";
|
||||
|
||||
// We need this because Forget has bug when props is passed in `undefined`
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState } from "react";
|
||||
|
||||
export default function AddTodo({ setTodos, themeColor = "#045975" }) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState } from "react";
|
||||
|
||||
// We need this because Forget has bug when props is passed in `undefined`
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState } from "react";
|
||||
|
||||
export default function AddTodo({ setTodos, themeColor = "#045975" }) {
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, { useState, useRef } from "react";
|
||||
import CountBadge from "../Components/CountBadge";
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user