paxstudent.blogg.se

React router dom component not rendering
React router dom component not rendering











react router dom component not rendering

I don't want to do that random stuff on the index.html because of bundle.js loading from cache and requesting it (Again, maybe it is flask or I don't understan how cache works). I discovered the problem isn't in flask, becuase i used the same app.py with another bundle.js created by npm run build of create-react-app

react router dom component not rendering

I think the problem is flask or maybe I don't understand how react-router-dom works. Here is my Hello.js (react-router-dom) import React, from 'react' react-dom react-router-redux url visual-studio-code async-await authentication dom import navigation router animation input mongodb react-jsx react-testing-library sass vue. ReactDOM.render(, document.getElementById('reactEntry')) src/index.js to src/index. Next, rename any file to be a TypeScript file (e.g. Here is my app.js (just rendering ) import Hello from './Hello' To add TypeScript to a Create React App project, first install it: 1 npm install -save-dev typescript types/node types/react types/react-dom types/jest types/react-router-dom. My app.py (Server) from flask import Flask, render_template, send_from_directory If you prefer to view to code at github, i suggest to start looking at the app.py, then the index.html in the templates folder, then the app.js and Hello.js in the js folder. It doesn't work with BrowserRouter nor HashRouter.Īnd the state in which is not working is here. I'm having a big trouble with this problem, the code works with create-react-app but not with python flask server. ReactDOM.render(app, document.React-router-dom not rendering component but it changes url, how do I make it render without reloading? Here's my index.js import React from 'react' It's blank, literally, just a blank page, no console error, no compilation errors mikestone14 added a commit to TheGnarCo/gnarails that referenced this issue on Jan 10, 2018. More info here: remix-run/react-router4924. Searching on the internets I found this to be a common problem for users of React Router. React router dom changes url, does not render component i am using 'react-router': '5.2.1' and 'react-router-dom': '5.3.0', When I use history. App was supposed to be showing something, anything. Fix React bug preventing updated routes from rendering new page.













React router dom component not rendering