'React remove bootstrap.tsx

Hello i have created new react app

there is index.tsx in src and all it contains is

 import("./bootstrap")

if i remove this import or modify it the app stops working

the bootstrap.tsx file contains this

import React from 'react';
import { render } from 'react-dom';
import App from './App';

const Root: React.FC = () => <App />;

render(<Root />, document.getElementById('root'));

how can i remove it ?

i would like to if my index.tsx would containt

something like this

ReactDOM.render(
    <BrowserRouter>
      <App />
    </BrowserRouter>,

  document.getElementById('root')

app.tsx




interface AppProps {
  appPath?: string;
}

const App: React.FC<AppProps> = () => {
  return (
    <HashRouter>
      <Route path="/" exact component={View1Component} />
    </HashRouter>
  );
};

export default App;




Solution 1:[1]

I just came across this problem.

To remove bootstrap simply run the command below in your terminal

npm uninstall bootstrap

This will automatically uninstall bootstrap from your dependencies

Solution 2:[2]

Hi and welcome to Stack Overflow.

Just by the nature of this question I assume there's plenty answers on the internet and for sure in S.O. that will answer this.

Also, I invite you to put the error that it appears when you remove that bootstrap import.

However, I will try my best for now, have you tried the obvious, npm uninstall bootstrap and the removing the import line from the index file?

Let us know how it goes!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 CodeNameManuel
Solution 2 Mese