国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

??
??? ????
??? ???
React ??? ?????? ???
? ? ????? CSS ???? ???? ?? ? ?? ??? ?????? ?? ??? ?????

???? ?? ? ?? ??? ?????? ?? ??? ?????

Apr 14, 2025 am 09:23 AM

???? ?? ? ?? ??? ?????? ?? ??? ?????

??? ??? ?? ?? ????? ????? ??? ???? ?????. ? ????? ?? ? ?? ??? ?????? ???? ?? ??? ????? ??????? ? ?? ??? ???? ??? ?????. ????? ??? ???? ?? ?? ??? ???? ? ?? ??? ?? ????.

? ???? ?? ? ?? ??? ?? ??? ?? ?? ?? ?????. ??? ?? ???? ?? ???? ?? REACT ?? ???? JEST?? ??? ???? ?? ??????.

??? ????

? ? ?? ??? ??? ????? ?? ??????.

  1. ?? ?? ??? : ?? ??? ????? ?????? ??????.
  2. ?? ? ?? ????? : ???? ? ? ? ??? ???? ???? ??? ?????.
  3. ??? ? ? -D-DO ?? : ??? ? ? ?? ?? ??? ???????.
  4. ? ? ?? : ? ? ??? ???? ??? ??????.

? ? ?? ?? ??? ??? ????.

 "React"?? reft, {usestate, useref};

const todo = () => {
  const [todos, settodos] = usestate ([[[
    {id : 1, ?? : "?? ??"},
    {id : 2, ?? : "???? ???"}
  ]);
  const todoref = useref ();
  const removetodo = id => {
    settodos (todos.filter (todo => todo.id! == id));
  };
  const addTodo = data => {
    id = todos.length 1;
    Settodos ([
      ... Todos,
      {
        ID,
        ?? : ???
      }
    ]);
  };
  const handlenewtodo = e => {
    e.preventDefault ();
    const item = todoref.current;
    addTodo (item.value);
    item.value = "";
  };
  ?? (
    <div classname="container"> {/ * ClassName? ClassName? ?? */}
      <div classname="row"> {/ * ClassName? ClassName? ?? */}
        <div classname="col-md-6"> {/ * ClassName? ClassName? ?? */}
          <h2>Todo? ??????</h2>
        </div>
      </div>

      <div classname="row"> {/ * ClassName? ClassName? ?? */}
        <div classname="col-md-6"> {/ * ClassName? ClassName? ?? */}
          <form onsubmit="{handleNewTodo}"> {/ * ?? ??? ?? ?? */}
            <input type="text" ref="{todoRef}" data-testid="input"> {/ * ?? ????? ??? */}
            <button type="submit" data-testid="add-button">?? ??</button> {/ * ?? ????? ??? */}
          </form>
        </div>
      </div>

      <div classname="row todo-list"> {/ * ClassName? ClassName? ?? */}
        <div classname="col-md-6"> {/ * ClassName? ClassName? ?? */}
          <h3>???</h3>
          {! todos.length? (
            <div classname="no-task">?? ????!</div>
          ) : (
            <ul data-testid="todos"> {/ * ?? ????? ??? */}
              {todos.map (todo => {
                ?? (
                  <li key="{todo.id}"> {/ * ?? ? ? ? */}
                    <div>
                      {todo.item}
                      <button data-testid="delete-button" onclick="{()"> removetodo (todo.id)}> x</button> {/ * ?? ??Data-testid ? OnClick */}
                    </div>
                  </li>
                );
              })}
            </ul>
          )}
        </div>
      </div>
    </div>
  );
};

?? ?? ??;

?? : classname ??? ? ???? className ?? ???????. ?? React Testing Library? ???? ?? ????? ?? data-testid ??? ???????.

??? ???

  1. ?? : npm install --save-dev enzyme enzyme-adapter-react-16
  2. ?? ?? (setuptests.js) :
 "??"?? ??? ????;
"Enzyme-Adapter-React-16"?? ?? ???;
enzyme.configure ({??? : ? ??? ()});
  1. ??? (todo.test.js) :
 "React"?? React React;
"??"?? {??, ???} ??;
"../todo"?? TODO ?? ??;

?? ( "todo", () => {
  it ( "??", () => {
    ??(<todo></todo> );
  });

  it ( "?? ? ?? ??", () => {
    const ?? = ??? (<todo></todo> );
    expling (?? .find ( "li")). ToHilegrength (2);
  });

  it ( "? ?? ??", () => {
    const ?? = ??? (<todo></todo> );
    Wrapper.Find ( "Input"). instance (). value = "?? ??? ??";
    Wrapper.Find ( '[type = "??"]'). ????? ( "??"); // ??? ??????? ???? ????
    expling (rapper.find ( "li")). ToHiLength (3);
    expling (wrapper.find ( "li"). last (). text ()). Tocontain ( "?? ??? ??"); // ?? ? ??
  });

  it ( "?? ??", () => {
    const ?? = ??? (<todo></todo> );
    rapper.find ( '[data-testid = "delete-button"]'). first (). simulate ( "click");
    expling (?? .find ( "li")). ToHilegrength (1);
  });
});

React ??? ?????? ???

  1. ?? : npm install --save-dev @testing-library/jest-dom @testing-library/react
  2. ??? (todo.test.js) :
 "React"?? React React;
"@testing-library/react"?? ?? ?? {render, fireevent, screen};
"../todo"?? TODO ?? ??;
"@testing-library/jest-dom"?? ??;

?? ( "todo", () => {
  it ( "?? ? ?? ??", () => {
    ???(<todo></todo> );
    expect (screen.getByTestId ( "todos"). children.length) .tobe (2);
  });

  it ( "??? ? ?? ?????", () => {
    ???(<todo></todo> );
    fireeevent.change (screen.getByTestId ( "input"), {target : {value : "new task"}});
    fireeevent.click (screen.getByTestId ( "Add-Button"));
    ?? (screen.getByTestId ( "todos"). children.length) .tobe (3);
  });

  it ( "? ? ??", () => {
    ???(<todo></todo> );
    fireeevent.click (screen.getAllByTestId ( "delete-button") [0];
    ?? (screen.getByTestId ( "todos"). children.length) .tobe (1);
  });
});

???? ??? ??? ?? ?? ??? ???????. ? ?? ? ????? ???? ?? ?? ??? ???? ?????. data-testid ???? ???? ?? ?? ??? ??? ??? ??????.

? ??? ???? ?? ? ?? ??? ?????? ?? ??? ?????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

?? ????
1793
16
Cakephp ????
1737
56
??? ????
1588
29
NYT ?? ??? ??
120
836
???
autopRefixer ? ???? ??? ?????? autopRefixer ? ???? ??? ?????? Jul 02, 2025 am 01:15 AM

AutoPrefixer? ?? ???? ??? ???? ?? ?? ???? CSS ??? ???? ???? ?????. 1. ????? ???? ???? ???? ??? ?????. 2. PostCSS ???? ??, CSS? ?? ???? ???? ?? ???? ??? ???? ??? ?? ??? ?????. 3. ?? ???? ???? ??, ??????? ?? ? ?? ???????? ????? ?? ?????. 4. ???? ???? ???? ???? ?? ?? ????, ???? ?? ??? ?? ???? ???? ????? ?? ???? ?? ????.

?? ??? ?? ?? ?? ?? ??? CSS ???? ?? ??? ?? ?? ?? ?? ??? CSS ???? Jul 02, 2025 am 01:04 AM

ToTeCreatesTickyHeaders andfooterswithcss, ?? ?? : stickyforheaderswithTopvalueAndz-index

Conic-Gradient () ??? ?????? Conic-Gradient () ??? ?????? Jul 01, 2025 am 01:16 AM

theconic-gradient () functionincsscreatescurcular gradientsthattroTecolorstopsaroundacentral point

CSS ??? ?? ??? ??? ?????? CSS ??? ?? ??? ??? ?????? Jun 25, 2025 am 12:16 AM

CSS ??? ?? ??? ??? ??? ????? ?? ???, ??? ??? ????? ??? ?? ????, ?? ??? ?? ??? ? ???? ??? ?? ?? ??? ?? ?????. ?? ?? .card ???? ?? ? ??? ???? ??? ???? ??? ???? ??? ? ????. ?? ??? ??? ????. 1. ?? : ?? ??? ?? ??? ??? ?????? ??; 2. ?? ?? ??? ?? ??? ???? ???? ?????. 3. ??? ??? ????? ???? ????. 4. ??? ????? ?? ??? ??? ?? ?? ?????????. ?? CSS ??? ??? ???? ??? ??? ?? ???? ?? ???????. ??? ???? ???? ??? ???? ?? ? ?? ??? ??? ?????. ???? ???? ?? ???? ?? ? ? ????

?? ??? ? ????? ????? CSS ???? ?? ??? ? ????? ????? CSS ???? Jul 07, 2025 am 12:07 AM

CSS?? ????? ??? ? ?? ??? ????. 1. HTML ? CSS? ?? ??? ?????? ???? ?? ???? ?? ???? ??????. 2. ?? ??? ??? ?? ???? ???? ?? ?? ??? ?? ?? ??? ??????. 3. ??? ????? ???? JavaScript? ?? ???? ?????? ??? ?????. ? ?? ??? ??? ??? ????? ?? ??, ??, ??? ? ?? ???? ?? ?? ?? ??? ???? ?????.

??? ?? ???? ??? ? CSS ???? ??? ?? ???? ??? ? CSS ???? Jul 02, 2025 am 12:52 AM

Mobile-FirstcsSdesignRequiresTtingTheviewPortMetatag, RelativeUnits, StylingFromsMallScreensup, ??? ???? andtouchtargets.first, addtocontrolscaling.second, ??%, em, orreminsteadofpixelsforflexelayouts.third

??? ??? ?? ???? ??? ???? ???? ??? ?????? ??? ??? ?? ???? ??? ???? ???? ??? ?????? Jul 02, 2025 am 12:53 AM

???? ?? ??? ????? ???? ???? ?? ???? ?? ? ? ????. 1. ?? : 0auto ?? ?? ???? ???? ?? ????? ??? ?? ??? ????? ????? ???????. 2. Flexbox? ???? ?? ?????? ??? ? ?? ?? ??? ???? ??? : 100VH? ???? ?? ? ?? ???? ???? ?? ?? ????? ????? ?????. 3. CSSGRID? ?? ?? ??? ???? ?? ????? ??? ???? ???? ?? ????? ?????? ??? ?? ????? ??? ???? ???????. ? ???? ?? ??? ???? ? ?? ??? ???? ?? ??? ?? ??? ???? ??????.

????? ?? ? ??? ????? ??? ??? ?????? ????? ?? ? ??? ????? ??? ??? ?????? Jul 02, 2025 am 01:19 AM

?? ?? ? ??? ????? ????? ?? ??? CSSGrid? ?? (Auto-Fit, Minmax ()) ??? ???? ????. 1. ???-???-?? ?? : ?? (?? ??, minmax (200px, 1fr)) ????? ?? ?? ???? ???? ? ?? ?? ? ?? ??? ????????. 2. ??? ???? ??? ??? ??????. 3. ????? ?? ?? ?? ??? ??????? 100%, ?? ?? : ?? ?? ??? ??? ???? ??? ?????? Border-Box? ???????. 4. ????? ?? ?? ??? ???? ????? ?? ? ??? ??? ??? ?????.

See all articles