I deleted a React component that was never used, but now the page won't render... huh?
I had a component in a ReactJS app I am working on that I sweeeearrr is not used anywhere. It even gave me the warning that "footer is defined but not used'. It isn't render anywhere and it never did anything, modify state... yet I'm getting an error message that says that the page cannot be rendered because the file is missing after I deleted it.
Is this simply a matter that I must be missing a connection somewhere?
A few troubleshooting tips. It's helpful if you include these details in your question so we know what you've already tried. Try one at a time and see if the error resolves:
- Restart your server (webpack-dev?).
- Clear browser cache or open an incognito window and load the page again.
- String-search your project for the file name.
yet I'm getting an error message that says that the page cannot be rendered because the file is missing after I deleted it.
An unused import / require statement is left in there.
Search for filename in the entire code base and remove usage.
Something like TypeScript would have caught this at compile time.