score:1
if your domain is, for example, "site.com", you only have routes for "site.com/home", "site.com/about" and "site.com/contact", so when your routing is empty, it's only normal that nothing is going to show up.
if you add a route to your root domain after all your routes, something should show up instead of nothing.
for example, try adding this after all your other routes;
<route path='/' component={home} exact/>
also, your props should be named "component" instead of "component" for your route component.
i tried replicating your scenario here:
you can edit the code and make your own changes as you learn about routing. i truly think though that you were not being able to see your jsx because of the first uppercase letter in your route props being "component" instead of "component".
Source: stackoverflow.com
Related Query
- React router not rendering JSX components
- React Router v4 not rendering components
- React - User-Defined JSX Components Not rendering
- react router not rendering components at route
- React Router Dom components rendering in App.js, but not as separate component
- React router not rendering components due to its structure
- React Router not rendering components
- React Router v4 not rendering parent components
- React Router not Rendering Components with Variable Params
- React router not rendering components anymore except the default one
- Mapping components with variable props not rendering from JSX to DOM, React
- React Router v4 with Express not rendering outside entry jsx
- React Router not rendering any components
- react router not rendering components on route change
- React Router not rendering components at all
- react router not rendering the component
- React router nested routes. Not rendering child routes
- React .- reduce() within JSX not rendering
- React Router serverside rendering errors: Warning: Failed propType: Required prop `history` was not specified in `RoutingContext`
- React router not rendering component
- svg not rendering correctly when used with by multiple react components
- Map of React Components not re rendering on State Change
- react jsx inline style not rendering when populated from a variable
- React components not rendering
- Nested Routes not rendering with React Router v4
- React router v4 - Rendering two components on same route
- Nested routes in React Router v4 not rendering as expected
- React Router 4 Nested Routes not rendering
- React router v6 not rendering
- react components not rendering with routes
More Query from same tag
- What exactly is makeStyles in material-ui?
- How to create an array of the last few hours in ReactJS?
- Define a function inside useEffect or outside?
- How to make CORS Request
- How to trigger a re-render in a component via useContext when said context is updated in another component
- How to update a child component without re-rendering without Redux
- useEffect loop due to useSelector updating
- Updating displayed value with React
- How to stop a useEffect function with a condition?
- Reactjs: why img's src cannot be passed to props?
- How can I retrieve elements and properties from the given JSON
- Is there a way to accept image as props in react component?
- ReactJS key attribute type
- error in calling function from another component on button click
- Check if input field is changed
- Javascrip default parameter ReferenceError: param is not defined
- Meteor collection undefined despite having the files in a lib directory
- How can I export the component class and that class method?
- npm install alway failed on jenkins build job (error code EPIPE)
- What is the better way for passing props to component in React?
- React question. How to change the interval value in setInterval dynamically
- Migrating React ES6 to TypeScript: import statements don't work
- Efficiently computing derived data from react props
- Redirect to another page in reactJS onClick
- React firebase login with basic if statement gives parsing error
- How do I test props passed to child component using Enzyme Shallow?
- React Typescript element types
- How can I export if / else if statements into the function inside Class component? react, node, express
- React Redux dispatch on componentDidMount -> property does not exist
- React Redux TypeError - is not a function