So I’m trying to make a website that record your voice, the problem is that when I send to a flask server the blob file or the blob url, my flask python code says that is no content while it is, how can I send the blob, so the server can save it as a file. and my python flask
Tag: reactjs
In React Js Axios request getting CROS error
I used Axios for API, here is my code. I am getting CROS error. Answer You’ll need to enable CORS from your back-end service. From the image, it is clear that your front-end in running on localhost on port 3000 whereas your back-end or api service is running on port 8000 on localhost. So, enable CORS fr…
I can’t import Link attribute from react-router-dom
I tried to import Link from react-router-dom & got compile error whether that module is not found. Then I installed it separately. Then got this error. My code: index.js navBar.jsx products.jsx Answer Before you can use the link tags, you first need to create a react router parent called <Routes> (v…
MediaSource never emit sourceopen event in React
I’m trying to stream a video file using Javascript’s MediaSource API in a React custom hook. Here’s the snippet of my code: It looks like mediaSource never emit ‘sourceopen’ event. What more, when I’m trying to use this code in different project with simple html and javascr…
how to send data From one component to another components with context in react?
I need to send selectedCoin state from Company to details.js How do I do this with context? company component: details components: Answer Well, looks like you’re just interested on the code right, so I’ll just drop the code in here. Obviously, feels free to move code around and make sure you use t…
Select an item from dropdown and use that value in another component in React native
I’m just trying to do something like that (when user select an item, then navigate to another component): Typically when we want to pass value between two component we use props : But in this case I have o idea how can I do it without invoked AirScreen Answer Just do something like this: You might want …
React – how to remove scroll listener
In Home Components, if you scroll down, you will see the Console log something. It’s because Which is Scroll Listener. The problem is that when I switch to other pages such as /about or /dashboard, the Console still log when scrolling because of console.log(e.progress);, which I want to get rid of when I swit…
How to integrate compound React(Typescript) component into html page
I have the old website which was built by Vanilia Javascript. And now I am converting it to React. So I am going to render compound React(Typescript) component in HTML page. But it does not work. Here is my code. app.html My component – Test.tsx I found many examples for this, but it was a simple compon…
Nextjs UseEffect is not rendering on route change
I am having problem with a useEffect inside a component which is in every component. I have made some authentication and redirects in that component but I figured that when I use Nextjs link or the go back button from the browser, the Layout useEffect is not re rendering which means it is not checking if the …
How do I update my NavBar once a user is logged-in (from ‘log in’ to ‘profile’) using React & Firebase?
I’m new to Reactjs & Firebase, but I’ve managed to set up a signup/login system- now once the user logs in, I have them redirected back to the home page, but I want the nav bar to display ‘profile’ instead of the original ‘log in’. I know this is something to do with Co…