score:0
Your problem is not related to typescript. In middleware/renderer.js
you wrote:
const html = ReactDOMServer.renderToString(React.createElement(<App />));
This is incorrect. Change it to:
const html = ReactDOMServer.renderToString(React.createElement(App));
And you're good to go.
You should read the error message. It's already told you what is going wrong. Also learn more about the React concepts, especially the difference between "JSX Element" and "JSX Component".
Source: stackoverflow.com
Related Query
- React app with typescript I want to integrate SSR in my app But got error
- Trying to deploy my React app with gh-pages but got this error message : The "file" argument must be of type string. Received type undefined
- React with TypeScript + Jest + Enzyme -- Error Test Expected 1 arguments, but got 2
- Typescript error TS2554: Expected 0 arguments, but got 1. while using useReducer and useContext with React
- How to solve TypeScript error with axios response in React app
- Typescript does not error on compilation with create react app
- React App runs locally but crashes with error code=H10 on Heroku
- I want rerender when props data change with react hooks but i got infinite rerender
- Trying to integrate jest and react with amchart but getting an error . What could be the issue?
- Typescript error with class attribute in MobX react app
- Getting a TypeScript error with redux dispatch in my React app
- React typescript error in todo app with context
- How to resolve "Expected 0 type arguments, but got 1" error on TypeScript React Hook useState()?
- Trying to deploy React App to Azure using a Github Actions workflow but getting an error in TypeScript
- Cannot find namespace 'ctx' error when creating Context with react - typescript
- How to detect the device on React SSR App with Next.js?
- Create React App not showing error message with ErrorBoundary
- create react app - without typescript , got Error: Failed to load parser '@typescript-eslint/parser'
- How can I avoid a TypeScript error with React useRef?
- 404 Error on refresh with SPA React Router app in GitHub Pages
- React Native app works when run from Xcode, but crashes when run with 'react-native run-ios'
- Create React App with TypeScript and NPM Link: Enums causing Module parse failed
- React app build failed for popper js typescript error
- Error when running jest on a react native + typescript app (Jest encountered an unexpected token)
- React SSR error -- Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object
- this.props.yyy is undefined while using react with typescript but working properly in es5?
- Typescript Error on super(): expected 1-2 arguments, but got 0
- Creating reusable Button Component with React and Typescript with not assignable type error
- React Custom Hook with Typescript Type error "Property 'x' does not exist on type 'interface | (({ target }: any) => void)'.ts(2339)"
- Redux: where to place interaction with the DOM, that is triggered by an action but changes outside of the React app
More Query from same tag
- Using react-testing-library with storyshots?
- Search Function unresponsive in React
- Material UI Raised Button not working
- How to convert image data response to Image base64?
- React IconTint (canvas) change color dynamically
- How to use this.refs for a list of child components
- Why function has to be called twice to update hook state?
- React content data not correct until page refreshed
- Recommended ways to build a responsive table
- React UI not updating on state change
- React.js: Add component with value
- where should I dispatch my redux
- React app only show home page on the server
- Why React Select does not show all the options?
- Yup.when: "`NaN` (cast from the value `NaN`)"
- Data driven Tabs with Material UI React
- in mui dropdrown, icons is not showing in dropdown after selecting option in once in react JS
- How to reload the page using React-Router's NavLink?
- Gatsby slug broken
- Create-React-App v3 not running Jest tests with Absolute Imports of other components
- React material-ui textfield decimal step of 1.00 on 1.00 as a default number
- React lazy recursive import
- Why in shouldComponentUpdate() nextProps and this.props are the same?
- Deck.GL ScatterplotLayer does not render points
- How to login validation using my api in React Js
- How to pass state to components rendered by Router
- How to download data as Excel (.xslx) in Nextjs
- How do i default check a radio button in react?
- Accessing state in child class
- Custom Theme not applying to components