Getting Started with NGXS 18 and Angular 18

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 พ.ย. 2024

ความคิดเห็น • 8

  • @CodeShotsWithProfanis
    @CodeShotsWithProfanis  3 หลายเดือนก่อน

    *Code Update*
    When I handled the UpdateComplete action at th-cam.com/video/Az5bNV1Vthc/w-d-xo.html I got fooled by Copilot and accepted the wrong code :(
    When we are dealing with the state, we should NOT mutate the state. We should produce a new state instead.
    This is the correct code
    const updatedTodoItems = state.todos.map((item) => {
    if (item.id === id) {
    return {
    ...item,
    completed: !item.completed,
    };
    }
    return item;
    });

  • @besretube
    @besretube หลายเดือนก่อน +1

    I don't how I can express what I feel right now, you won't understand how much your video helped me after being stuck for more than 24 hours! thanks a lot!

  • @SebastianDra
    @SebastianDra 9 วันที่ผ่านมา +1

    Great Tutorial! Perhaps you can create a Tutorial how to solve Daily problems with redux devtools / add logging / find bugs etc?

  • @GaryAnthonyScottonGplus
    @GaryAnthonyScottonGplus 2 หลายเดือนก่อน

    Great video as always, I have never used ngxs before only ngrx.
    2 quick questions:
    In your experience what would make you choose one over the other? ngrx / ngxs
    What vs code plug-in shows the function parameters names, as I would find it very useful? I hope this makes sense😂
    I.e createSelector(selectors: ..., projector: ...)...

    • @neduj376
      @neduj376 หลายเดือนก่อน +2

      Inline Parameters for VSCode

    • @CodeShotsWithProfanis
      @CodeShotsWithProfanis  24 วันที่ผ่านมา +1

      For the VSCode, you can set these properties in your JSON file
      // This displays the parameter names
      "typescript.inlayHints.parameterNames.enabled": "all",
      // This displays the variable types
      "typescript.inlayHints.variableTypes.enabled": true,

    • @CodeShotsWithProfanis
      @CodeShotsWithProfanis  24 วันที่ผ่านมา +1

      As of the NGRX/NGXS, I find the NGXS easier to use and has less boilerplate code.
      I have tried NGXS from small to enterprise applications and it fits great on every occasion :)