dale tan
dale tan
should these projects combine instead? I know fragmentation can lead to confused users when one doc site does one thing and another does another thing, etc.
for TypeScript, you'll need to import the `FunctionComponent` (`FC` for short) from react: ```tsx import React, { FC } from 'react'; type MyComponentProps = { label: string; size: 's' |...
ah, i did not know that @mjsarfatti. Thanks for the clarification!
`useRef` is a generic so you can pass any type you want into it so that it can internally know what `.current` is supposed to be. Since you're using `null`...
@ferdaber so do you mean when you don't pass in `T | null`, typescript will complain if you try to do `myRef.current = 'some new ref'`?
You should be able to type your function components like this: ```jsx import React, { FC } from 'react'; type Props = { prop1: string; prop2: string; } const MyComponent:...
by using `FC`/`FunctionComponent`, that type is already returning a `ReactElement`. You don't need to add an actual return type like you have outlined with ` FC = (): JSX_MYCOMPONENT` -...
> All I'm saying is you have to transpile it, node doesn't support it. @SimenB we are transpiling our server-side code with babel and do not need the `'dynamic-import-node'` plugin...
@MilosRasic `or it's dead code` is definitely not the case here 😄 @SimenB thanks for pointing me in the right direction. Though we use webpack, we don't use it on...
@sokra thanks! it was the `contentBase` (well, `--content-base`) that i had set incorrectly based on the article. I guess I could have just forgone that option after reading it over...