ash1eygrace / ai-content

A React app that uses OpenAI's Generative Pre-trained Transformer 3 (GPT-3) autoregressive deep learning language model to generate human-like text.
11 stars 3 forks source link

Update all dependencies and fix related console errors #76

Closed ash1eygrace closed 1 year ago

ash1eygrace commented 1 year ago

Updated dependencies to:

    "bootstrap": "^5.2.3",
    "react": "^18.2.0",
    "react-bootstrap": "^2.7.2",
    "react-dom": "^18.2.0",
    "react-icons": "^4.8.0",
    "react-router": "^6.10.0",
    "react-router-dom": "^6.10.0",
    "react-scripts": "^5.0.1"

Also updates the rendering method in the application to use the new createRoot() API introduced in React 18. The previous implementation used ReactDOM.render(), which is now deprecated and generates a warning. The changes in this PR ensure that the application remains compatible with the latest version of React and follows best practices.

Key changes:

Replaced the import of ReactDOM with createRoot from react-dom/client. Updated the rendering code in index.js to use the new createRoot() API instead of the deprecated ReactDOM.render() method.

Related documentation: https://reactjs.org/link/switch-to-createroot

ash1eygrace commented 1 year ago

Also, changing

"build": "react-scripts --openssl-legacy-provider build", to "build": "react-scripts build",

To see if the auto-deploy GitHub Actions will work now that the dependencies have been updated.