The type or namespace name 'AspNet' does not exist in the namespace...
I've downloaded a website and in VS express open it through file => open website. When I press F5 to debug I get build errors:The type or namespace name 'AspNet' does not exist in the namespace...
View ArticleAnswer by HMR for Ref to html element does not have correct height
Below is a snippet that shows the problem, using an effect to set a height state value based on a ref doesn't work if you conditionally render components passing the same ref. The solution I used was...
View ArticleComment by HMR on Ref to html element does not have correct height
I have tried for 2 hours to create a reproducible example but was unable to do this. In my project it would not work but my project uses content selectors that creates hidden content and at some point...
View ArticleRef to html element does not have correct height
I know this has been asked many times and the answer is always that the effect does not run when refs are mutated but that is not the issue because I run the effect every second until I have an html...
View Articlevscode format not formatting
I installed prettier plugin for vscode and have a .pretteirrc.js:module.exports = { trailingComma: 'es5', tabWidth: 2, semi: true, singleQuote: true, printWidth: 60,}In settings the default formatter...
View ArticleHow to get the last modification date of a file in a git repo?
I'm trying to find a command to get the last modified date of a file in a local git repo.I have created the repo and done one commit. I only had to edit one file and will commit it, but I was wondering...
View ArticleVue i18n sometimes warn about missing key
In my home component I have the following:const { location } = useLocation();const { t, n } = useI18n();const freeShippingValue = computed(() => { return n(100, 'currency', location.value);});In my...
View ArticleDocker container, how to use host proxy
Because I'm in China it is nearly impossible to use Docker Hub, Git, GitHub, npm and loads of other tools without a VPN.I finally found how to have the Docker daemon use a proxy (share VPN in the VPN...
View ArticleHow to change indentation in Visual Studio Code?
For every typescript file visual studio code uses an auto indentation of 8 spaces. This is a bit too much for my taste but I can't find where to change it.Maybe it's available as a setting but under a...
View ArticleNext.js getServerSideProps show loading
I am using getServerSideProps in pages/post/index.js:import React from "react";import Layout from "../../components/Layout";function Post({ post }) { console.log("in render", post); return (<Layout...
View ArticleMongoose auto increment
According to this mongodb article it is possible to auto increment a field and I would like the use the counters collection way.The problem with that example is that I don't have thousands of people...
View ArticlePrevent Y scrollbar on parent and adding scrollbar to child
I have a parent that is used as a React component and has a scrollbar, I cannot change the parent but in a certain case I'd like the parent not to display the scrollbar and instead have the child...
View ArticleAnswer by HMR for Jest ReferenceError: Request is not defined
Jest has an outdated jsdom config because it uses outdated jsdom.I applied the sollution here and it works as long as I add the ts file in the jest config as testEnvironment but won't if I want to use...
View Articletrpc error Input parser must be a ZodObject
I have the following input schema:const inputSchema = z.union([ z.object({ id: z.string(), }), z.object({ key: z.string(), }),])This schema works until I do:import { generateOpenApiDocument } from...
View ArticleAnswer by HMR for trpc error Input parser must be a ZodObject
I found that trpc-opeapi uses zod-to-json-schema and zod-to-json-schema does not support union. Hence trpc-openapi does not support OpenAPI 3 spec.
View Articlei18n currency produces many warnings
I have the following warning in my vue 3 app:[intlify] Not found 'currency' key in 'US' locale messages.[intlify] Fall back to number format 'currency' key with 'en-US' locale[intlify] Fall back to...
View ArticleAnswer by HMR for Is there a performance penalty when using closures to...
selectOrdersByCustomer(customerId) Creates a new function every time it is called but still does not need to be a problem if you have a pure component that only re renders when customerId changes:const...
View ArticleGet the last modification date of a file in git repo
I'm trying to find a command to get the last modified date of a file in a local git repo.I have created the repo and done one commit. I only had to edit one file and will commit it, but I was wondering...
View ArticleReact MUI TreeView key navigation broken when using a Branch component
When I do the following I can navigate with my arrow keys through the tree and the tree gets focus when I tab through the document (only root items, sub branches are broken because they use...
View ArticleAnswer by HMR for For what purpose useSelector() and reselect...
You cannot always pass values to a component from its parent because the parent doesn't logically own the value (shared state) or because there are many component in between the component that has the...
View Article