diff --git a/docs/react/_category_.json b/docs/react/_category_.json
deleted file mode 100644
index 6f7bf7453..000000000
--- a/docs/react/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "React",
- "position": 22,
- "link": {
- "type": "generated-index",
- "description": "React is a JavaScript library for building user interfaces. It is maintained by Facebook and a community of individual developers and companies."
- }
- }
\ No newline at end of file
diff --git a/docs/react/advanced-usage/_category_.json b/docs/react/advanced-usage/_category_.json
deleted file mode 100644
index 3628975e8..000000000
--- a/docs/react/advanced-usage/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "Advanced Usage",
- "position": 10,
- "link": {
- "type": "generated-index",
- "description": "5 minutes to learn the most important RoadMap for React Mastery."
- }
- }
\ No newline at end of file
diff --git a/docs/react/advanced-usage/advanced-configuration.md b/docs/react/advanced-usage/advanced-configuration.md
deleted file mode 100644
index f15ab9223..000000000
--- a/docs/react/advanced-usage/advanced-configuration.md
+++ /dev/null
@@ -1,134 +0,0 @@
----
-id: advanced-configuration
-title: Advanced Configuration
-sidebar_label: Advanced Configuration
-sidebar_position: 4
-tags: [Create React App, Advanced Configuration, Environment Variables, Webpack, Babel, CRACO, react-scripts, Custom Scripts, Ejectify, Custom Templates]
-keywords: [create react app, advanced configuration, environment variables, webpack, babel, craco, react-scripts, custom scripts, ejectify, custom templates]
-description: Learn how to customize and fine-tune your React projects with advanced configuration options in Create React App. Discover powerful features and alternatives to ejecting that will help you take control of your development environment.
----
-In Create React App, you have the power to customize various development and production settings using environment variables. These options allow you to control the behavior of your React application without diving into complex configurations. Let's take a closer look at each setting in a handy table format:
-
-| Variable | Development | Production | Usage |
-| :------------------------ | :---------: | :--------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| BROWSER | ✅ Used | 🚫 Ignored | Override the default system browser that Create React App opens during development. You can specify a specific browser or set it to `none` to disable browser opening. You can even use a custom Node.js script for launching the browser with additional arguments from `npm start`. |
-| BROWSER_ARGS | ✅ Used | 🚫 Ignored | Pass additional arguments to the browser instance when `BROWSER` is specified. Multiple arguments are supported, separated by spaces. |
-| HOST | ✅ Used | 🚫 Ignored | Specify a custom host for the development web server. By default, it binds to all available hostnames on the device. |
-| PORT | ✅ Used | 🚫 Ignored | Set a custom port for the development web server. By default, it listens on port 3000 or finds the next available port if 3000 is in use. |
-| HTTPS | ✅ Used | 🚫 Ignored | Run the development server in `https` mode by setting this variable to `true`. |
-| WDS_SOCKET_HOST | ✅ Used | 🚫 Ignored | Specify a custom WebSocket hostname for hot module reloading in the development server. Useful when working on multiple Create React App projects simultaneously. |
-| WDS_SOCKET_PATH | ✅ Used | 🚫 Ignored | Set a custom WebSocket path for hot module reloading in the development server. Helpful when working on multiple Create React App projects simultaneously. |
-| WDS_SOCKET_PORT | ✅ Used | 🚫 Ignored | Use a custom WebSocket port for hot module reloading in the development server. Useful for working on multiple Create React App projects simultaneously. |
-| PUBLIC_URL | ✅ Used | ✅ Used | Force assets to be referenced verbatim to the provided URL (including hostname). Useful when using a CDN to host your application. This variable overrides the default assumption of your app's hosting location specified in `package.json` (`homepage`). |
-| BUILD_PATH | 🚫 Ignored | ✅ Used | Specify a new path for Create React App to output compiled assets during the production build. By default, assets are output to `/build` directory adjacent to your `/src`. |
-| CI | ✅ Used | ✅ Used | Treat warnings as build failures and make the test runner non-watching when `true`. Most Continuous Integration (CI) environments set this flag by default. |
-| REACT_EDITOR | ✅ Used | 🚫 Ignored | Override the automatic editor detection in development. When your app crashes, you'll see an error overlay with a clickable stack trace. Clicking it opens the relevant source file based on running processes. You can set this variable to your editor's bin folder's path or `none` to disable it. |
-| CHOKIDAR_USEPOLLING | ✅ Used | 🚫 Ignored | Run the watcher in polling mode (`true`) if `npm start` isn't detecting changes. Useful inside virtual machines (VMs). |
-| GENERATE_SOURCEMAP | 🚫 Ignored | ✅ Used | Enable (`true`) or disable (`false`) source maps generation during production build. Disabling source maps can resolve Out of Memory (OOM) issues on some smaller machines. |
-| INLINE_RUNTIME_CHUNK | 🚫 Ignored | ✅ Used | Embed (`true`) or import as usual (`false`) the runtime script into `index.html` during production build. Use this when dealing with Content Security Policy (CSP) restrictions. |
-| IMAGE_INLINE_SIZE_LIMIT | ✅ Used | ✅ Used | Control the size limit (in bytes) for images that will be inlined in the CSS or JS build artifact as data URI in base64. Set to `0` to disable image inlining. |
-| FAST_REFRESH | ✅ Used | 🚫 Ignored | Enable (`true`) or disable (`false`) experimental Fast Refresh support. Fast Refresh allows tweaking components in real-time without reloading the page. |
-| TSC_COMPILE_ON_ERROR | ✅ Used | ✅ Used | Allow running and building TypeScript projects even with TypeScript type check errors. Errors are displayed as warnings in the terminal and/or browser console. |
-| ESLINT_NO_DEV_ERRORS | ✅ Used | 🚫 Ignored | Convert ESLint errors to warnings during development, hiding them from the error overlay. |
-| DISABLE_ESLINT_PLUGIN | ✅ Used | ✅ Used | Completely disable the [eslint-webpack-plugin](https://github.com/webpack-contrib/eslint-webpack-plugin). |
-| DISABLE_NEW_JSX_TRANSFORM | ✅ Used | ✅ Used | Disable (`true`) the new JSX transform introduced in React 17 and backported to React 16.14.0, 15.7.0, and 0.14.10. New projects have this enabled by default, but you may need to disable it in existing projects if you can't upgrade React. |
-
-Remember to experiment with these configurations, as it allows you to tailor your React application according to your specific requirements.
-
-## Advanced Configuration in Create React App
-
-Welcome to the world of advanced configurations in Create React App! 🚀 In this guide, we'll dive deeper into the powerful features and options available to fine-tune your React projects. Don't worry; we'll make sure it's easy to understand, even for beginners!
-
-## What is Create React App?
-
-For those who are new to Create React App (CRA), it's a fantastic tool that helps you kickstart your React projects without getting bogged down in complex setup processes. CRA abstracts away the configuration, allowing you to focus on building amazing React applications right from the get-go.
-
-## Customizing the Configuration
-
-CRA provides a way to customize its configuration without ejecting your project. Ejecting means you'd have to deal with all the build tools and configurations yourself, which can be overwhelming for beginners. So, let's look at how to customize the configuration while staying within the comfort zone of CRA.
-
-### Environment Variables
-
-Environment variables are super handy for managing various settings in your app. By default, CRA supports `.env` files, but you can create environment-specific files like `.env.development`, `.env.production`, etc.
-
-```bash
-# .env.development
-REACT_APP_API_URL="https://api.dev.example.com"
-```
-
-Now, you can access the variable like this:
-
-```javascript
-const apiUrl = process.env.REACT_APP_API_URL;
-```
-
-### Adding Webpack Plugins
-
-Webpack is the magic behind CRA, and you can extend it with plugins. For example, let's add the "Bundle Analyzer" plugin to visualize your bundle's size:
-
-```javascript
-// In your react-scripts version 5.0.0+ or higher, you can use the following syntax in the 'webpack.config.js'
-const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
-
-// Inside your 'webpack.config.js' module.exports object, add this plugin to the 'plugins' array
-module.exports = {
- // ... other config options ...
- plugins: [
- // ... other plugins ...
- new BundleAnalyzerPlugin(),
- ],
-};
-```
-
-### Rewriting the Webpack Config
-
-Need more control over the Webpack configuration? CRA offers a simple way to extend the config directly:
-
-```javascript
-// In your react-scripts version 4.0.0+ or higher, you can use the following syntax in the 'craco.config.js'
-module.exports = {
- webpack: {
- configure: (webpackConfig) => {
- // Add your custom webpack config here
- webpackConfig.optimization.minimize = true;
- return webpackConfig;
- },
- },
-};
-```
-
-### Adding Babel Plugins
-
-To further enhance your app's capabilities, you can add Babel plugins to transform your code. For example, let's add the "transform-class-properties" plugin:
-
-```bash
-npm install --save-dev @babel/plugin-proposal-class-properties
-```
-
-Then, create a `.babelrc` file in the root of your project:
-
-```json
-{
- "plugins": ["@babel/plugin-proposal-class-properties"]
-}
-```
-
-Now you can use class properties in your components:
-
-```javascript
-class MyClassComponent extends React.Component {
- state = {
- count: 0,
- };
-
- handleClick = () => {
- this.setState((prevState) => ({ count: prevState.count + 1 }));
- };
-}
-```
-
-## Conclusion
-
-Congratulations! You've taken your first steps into the exciting world of advanced configuration in Create React App. Now you can customize your projects, add plugins, and take control of your development environment with confidence.
-
-Remember, the power of customization comes with great responsibility. Always experiment with caution and keep an eye on the official documentation for the latest updates and best practices. Happy coding! 🎉
\ No newline at end of file
diff --git a/docs/react/advanced-usage/alternatives-to-ejecting.md b/docs/react/advanced-usage/alternatives-to-ejecting.md
deleted file mode 100644
index dbc65760f..000000000
--- a/docs/react/advanced-usage/alternatives-to-ejecting.md
+++ /dev/null
@@ -1,51 +0,0 @@
----
-id: alternatives-to-ejecting
-title: Alternatives to Ejecting
-sidebar_label: Alternatives to Ejecting
-sidebar_position: 5
-tags: [React, Create React App, Advanced Usage]
-keywords: [alternatives to ejecting, create react app, react-scripts, craco, custom scripts, package.json, ejectify, custom templates, boilerplates]
-description: Learn about alternatives to ejecting from Create React App and how to customize your project without ejecting.
----
-
-## Introduction
-
-Create React App (CRA) is an awesome tool that provides a quick and easy way to set up a React project with no build configuration. However, sometimes you might find yourself needing more control over the build process or wanting to add custom configurations. The traditional way to achieve this is by ejecting from Create React App, but it can be a bit intimidating for beginners and can lead to maintenance headaches. Fear not, for there are some fantastic alternatives that will let you customize your project without the need to eject! 🚀
-
-## 1. **Customize with react-scripts**
-
-Instead of ejecting, you can use the `react-scripts` package that comes with Create React App under the hood. It offers hidden features that you can use to tweak your project's settings without ejecting. Create a file in the root of your project called `.env`, and you can add custom environment variables like this:
-
-```plaintext
-REACT_APP_MY_VARIABLE=hello-coders
-```
-
-Now you can access this variable in your code using `process.env.REACT_APP_MY_VARIABLE`.
-
-## 2. **CRACO - Create React App Configuration Override**
-
-CRACO is like magic for your Create React App projects. It stands for Create React App Configuration Override and lets you easily modify CRA's configuration without ejecting. You can add custom webpack configurations, Babel plugins, and much more, all from a single configuration file. It's like wielding a powerful wand to control your project's build process! 🧙♂️
-
-## 3. **Custom Scripts in `package.json`**
-
-For simpler customizations, you can add your own scripts directly to the `package.json` file. For example, you can create a script to run a pre-build task or automate some setup steps. Just add something like this:
-
-```json
-"scripts": {
- "custom-script": "node scripts/customScript.js"
-}
-```
-
-Then, you can run your custom script using `npm run custom-script`.
-
-## 4. **Ejectify - The Un-Ejecting Tool**
-
-Ejectify is a fun and clever tool that reverses the eject process. Instead of ejecting, you can use Ejectify to "un-eject" your Create React App project. This means you can revert to a state similar to a pre-eject status while keeping all your customizations intact! It's like traveling back in time to undo a decision without any regrets! ⏰
-
-## 5. **Custom Templates and Boilerplates**
-
-If you have specific project requirements, you can create your own custom templates or boilerplates with all the necessary configurations pre-set. Tools like `degit` allow you to easily scaffold a new project based on your custom template, saving you time and effort. It's like having your own personalized React project starter kit! 🎁
-
-## Conclusion
-
-As you can see, there's no need to fear the eject button anymore! With these amazing alternatives, you can confidently customize your Create React App projects without the complexity and drawbacks of ejecting. So go ahead, unleash your creativity, and build incredible React applications while keeping the magic of Create React App alive! Happy coding! 😄🚀
diff --git a/docs/react/advanced-usage/can-i-use-decorators.md b/docs/react/advanced-usage/can-i-use-decorators.md
deleted file mode 100644
index 06538237d..000000000
--- a/docs/react/advanced-usage/can-i-use-decorators.md
+++ /dev/null
@@ -1,151 +0,0 @@
----
-id: can-i-use-decorators
-title: The Power of Decorators in CRA
-sidebar_label: Use Decorators
-sidebar_position: 2
-tags: [decorators, create react app, decorators in create react app, decorators in react, decorators in javascript, decorators in typescript]
-keywords: [decorators, create react app, decorators in create react app, decorators in react, decorators in javascript, decorators in typescript]
-description: Learn how to use decorators in Create React App to enhance and extend the functionality of your components.
----
-
-
-## Introduction to Decorators
-
-Decorators are an amazing feature in JavaScript that allows us to enhance and extend the functionality of classes and their properties. They are essentially special functions that wrap around components and add magic to our code. Create React App (CRA) supports decorators out of the box, making it super easy for us to level up our React components! In this guide, we'll delve into decorators, how to set up CRA for using them, and explore some cool examples.
-
-## Understanding Decorators
-
-In simple terms, decorators are like cool stickers that you put on your React components to make them extra special. They start with the `@` symbol, and you can think of them as powerful modifiers that can change the behavior of classes, methods, or properties.
-
-## Setting Up CRA for Decorators
-
-Before we can start using decorators in our CRA project, we need to set up the right environment. Don't worry; it's a breeze! Here's what you need to do:
-
-1. First, let's create your CRA project:
-
- ```bash
- npx create-react-app my-app
- cd my-app
- ```
-
-2. Now, let's install the magical `babel-plugin-transform-decorators-legacy` package:
-
- ```bash
- npm install babel-plugin-transform-decorators-legacy --save-dev
- ```
-
-3. Finally, let's configure Babel to recognize decorators by adding the plugin in your `package.json` file:
-
- ```json title="package.json"
- {
- "name": "my-app",
- "version": "0.1.0",
- "babel": {
- "plugins": [
- "babel-plugin-transform-decorators-legacy"
- ]
- }
- }
- ```
-
-## Using Decorators in CRA
-
-Now comes the fun part! Let's see how we can use decorators to make our components shine:
-
-### Class Decorators
-
-Imagine class decorators as superhero capes you put on your entire component class. They can change the class's behavior or even add cool superpowers! Check this out:
-
-```jsx title="MyComponent.jsx"
-import React from 'react';
-
-function withHoverStyle(WrappedComponent) {
- return class extends React.Component {
- state = { isHovered: false };
-
- handleMouseEnter = () => this.setState({ isHovered: true });
- handleMouseLeave = () => this.setState({ isHovered: false });
-
- render() {
- return (
-
- );
- }
-}
-```
-
-In this example, the `withHoverStyle` decorator adds a nice hover effect to our component, all without modifying the original component code!
-
-### Method Decorators
-
-Method decorators are like little wizards that cast spells on specific methods in your component. Let's create a decorator to throttle an expensive method:
-
-```jsx title="MyComponent.jsx"
-function throttle(wait) {
- return function (target, key, descriptor) {
- let timeout;
-
- descriptor.value = function (...args) {
- clearTimeout(timeout);
- timeout = setTimeout(() => {
- target.apply(this, args);
- }, wait);
- };
-
- return descriptor;
- };
-}
-
-class MyComponent extends React.Component {
- @throttle(500)
- handleScroll() {
- // Expensive operation
- }
-}
-```
-
-Here, the `throttle` decorator makes sure that the `handleScroll` method is only called every 500 milliseconds, preventing performance bottlenecks!
-
-### Property Decorators
-
-Property decorators are like the secret agents that guard your component properties. They can enforce rules or do other behind-the-scenes stuff. Let's make a property read-only:
-
-```jsx title="MyComponent.jsx"
-function readonly(target, key, descriptor) {
- descriptor.writable = false;
- return descriptor;
-}
-
-class MyComponent extends React.Component {
- @readonly
- title = 'My Component';
-}
-```
-
-Now, the `title` property cannot be changed from outside the component, keeping your data safe and sound.
-
-## Conclusion
-
-Decorators are a superpower in Create React App, and now you know how to use them to make your components even more awesome! By leveraging class, method, and property decorators, you can add exciting features, enhance behavior, and make your codebase cleaner and more organized.
-
-Remember, with great power comes great responsibility. Use decorators wisely and sparingly, and you'll become a true React pro in no time! Happy coding!
\ No newline at end of file
diff --git a/docs/react/advanced-usage/custom-templates.md b/docs/react/advanced-usage/custom-templates.md
deleted file mode 100644
index c3c0a2031..000000000
--- a/docs/react/advanced-usage/custom-templates.md
+++ /dev/null
@@ -1,301 +0,0 @@
----
-id: custom-templates
-title: Custom Templates
-sidebar_label: Importing a Component
-sidebar_position: 1
-tags: [create react app, custom templates, custom template, react project, project setup, project configuration, project dependencies, project folder structure, react app, react project setup, react project configuration, react project dependencies, react project folder structure, react project template, react project scaffolding, react project boilerplate, react project starter kit, react project setup template, react project configuration template, react project dependencies template, react project folder structure template, react project scaffolding template, react project boilerplate template, react project starter kit template, react project setup boilerplate, react project configuration boilerplate, react project dependencies boilerplate, react project folder structure boilerplate, react project scaffolding boilerplate, react project starter kit boilerplate]
-keywords: [create react app, custom templates, custom template, react project, project setup, project configuration, project dependencies, project folder structure, react app, react project setup, react project configuration, react project dependencies, react project folder structure, react project template, react project scaffolding, react project boilerplate, react project starter kit, react project setup template, react project configuration template, react project dependencies template, react project folder structure template, react project scaffolding template, react project boilerplate template, react project starter kit template, react project setup boilerplate, react project configuration boilerplate, react project dependencies boilerplate, react project folder structure boilerplate, react project scaffolding boilerplate, react project starter kit boilerplate]
-description: Learn how to create and use custom templates in Create React App to quickly start new projects with specific configurations, dependencies, and folder structures.
----
-
-## Introduction to Custom Templates
-
-Custom templates in Create React App (CRA) are pre-configured project setups that allow developers to scaffold new projects with specific configurations, dependencies, and folder structures. They enable you to avoid repetitive manual setup and quickly start your projects with your preferred settings. In this guide, we'll create a custom template that includes a popular UI library, sets up a state management system, and adds some custom scripts for building an engaging React app.
-
-:::note
-This feature is available with `react-scripts@3.3.0` and higher.
-:::
-
-Custom Templates in Create React App empower you to select a specialized project template while retaining all the benefits of Create React App's features.
-
-Custom Templates follow the naming convention `cra-template-[template-name]`, but you only need to provide `[template-name]` when creating a new project.
-
-Scoped templates are also supported using the format `@[scope-name]/cra-template` or `@[scope-name]/cra-template-[template-name]`, which can be installed via `@[scope]` and `@[scope]/[template-name]` respectively.
-
-To create a new project using a custom template, use the following command:
-
-```sh
-npx create-react-app my-app --template [template-name]
-```
-
-## Finding Custom Templates
-
-Create React App ships with two default templates:
-
-- [`cra-template`](https://github.com/facebook/create-react-app/tree/main/packages/cra-template)
-- [`cra-template-typescript`](https://github.com/facebook/create-react-app/tree/main/packages/cra-template-typescript)
-
-However, the community offers a wide range of great custom templates. You can find them by searching for ["cra-template-\*"](https://www.npmjs.com/search?q=cra-template-*) on npm.
-
-## Building a Custom Template
-
-If you're interested in creating your custom template, start by exploring how the default [`cra-template`](https://github.com/facebook/create-react-app/tree/main/packages/cra-template) is built.
-
-A custom template must adhere to the following structure:
-
-```
-cra-template-[template-name]
- ├── README.md (for npm)
- ├── template.json
- ├── package.json
- ├── template
- | ├──README.md (for projects created from this template)
- | ├──gitignore
- | ├──public
- | | ├──index.html
- | | └── ...
- | ├──src
- | ├── index.js (or index.tsx)
- | └── ...
- └── ...
-```
-
-### Testing a Custom Template
-
-To test a custom template locally, use the `file:` prefix followed by the file path to your template source.
-
-```sh
-npx create-react-app my-app --template file:../path/to/your/template/cra-template-[template-name]
-```
-
-### The `template` Folder
-
-The `template` folder is copied to the user's app directory when Create React App installs. During this process, the file `gitignore` is renamed to `.gitignore`.
-
-Feel free to add any additional files you want in this folder, but ensure you have at least the files specified above.
-
-### The `template.json` File
-
-The `template.json` file is the configuration file for your custom template. As this feature evolves, more options will be added. For now, only the `package` key is supported.
-
-The `package` key allows you to provide any keys/values you want to add to the new project's `package.json`. You can include dependencies and any custom scripts your template relies on.
-
-Below is an example `template.json` file:
-
-```json title="template.json"
-{
- "package": {
- "dependencies": {
- "eslint-plugin-jsx-a11y": "^6.2.3",
- "serve": "^11.2.0"
- },
- "scripts": {
- "serve": "serve -s build",
- "build-and-serve": "npm run build && npm run serve"
- },
- "eslintConfig": {
- "extends": ["react-app", "plugin:jsx-a11y/recommended"],
- "plugins": ["jsx-a11y"]
- }
- }
-}
-```
-
-Any values you add for `"dependencies"` and `"scripts"` will merge with the Create React App defaults. For other keys, the values will be used as-is, replacing any matching Create React App defaults.
-
-As a convenience, we automatically replace `npm run` with `yarn` in your custom `"scripts"`, as well as in your `README` when projects are initialized with yarn.
-
-
-## Step-by-Step Guide to Creating Custom Templates in Create React App
-
-### Step 1: Setting Up the Initial CRA Project
-
-Before creating our custom template, we need to set up a basic Create React App project. If you haven't installed CRA, do it using npm (Node Package Manager):
-
-```bash
-npm install -g create-react-app
-```
-
-Once installed, create a new React app with the following command:
-
-```bash
-npx create-react-app my-custom-template-app
-```
-
-Replace `my-custom-template-app` with your preferred project name.
-
-### Step 2: Customize Your CRA Project
-
-In the newly created `my-custom-template-app` directory, you'll find the basic CRA project structure. We'll now add some customizations to our template.
-
-#### Example Customization 1: Adding a UI Library
-
-For our example, let's use the popular UI library `Material-UI`. Install it using npm:
-
-```bash
-npm install @mui/material @emotion/react @emotion/styled
-```
-
-Next, create a new file `CustomButton.js` in the `src` folder with the following code:
-
-```jsx title="CustomButton.js"
-// CustomButton.js
-import React from 'react';
-import Button from '@mui/material/Button';
-
-const CustomButton = ({ text }) => {
- return ;
-};
-
-export default CustomButton;
-```
-
-In the `src/App.js` file, import and use the `CustomButton` component:
-
-```jsx title="App.js"
-// App.js
-import React from 'react';
-import CustomButton from './CustomButton';
-
-function App() {
- return (
-
-
Hello, Custom Template!
-
-
- );
-}
-
-export default App;
-```
-
-#### Example Customization 2: Setting Up State Management (using Redux)
-
-For state management, we'll integrate Redux into our custom template. Install the required packages:
-
-```bash
-npm install redux react-redux
-```
-
-Now, create a new folder named `store` in the `src` directory. Inside this folder, create a file `counterSlice.js` with the following code:
-
-```jsx title="src/store/counterSlice.js"
-// src/store/counterSlice.js
-import { createSlice } from '@reduxjs/toolkit';
-
-const counterSlice = createSlice({
- name: 'counter',
- initialState: { value: 0 },
- reducers: {
- increment(state) {
- state.value += 1;
- },
- decrement(state) {
- state.value -= 1;
- },
- },
-});
-
-export const { increment, decrement } = counterSlice.actions;
-export default counterSlice.reducer;
-```
-
-In the `src/store` folder, create a file named `store.js` to set up the Redux store:
-
-```jsx title="src/store/store.js"
-// src/store/store.js
-import { configureStore } from '@reduxjs/toolkit';
-import counterReducer from './counterSlice';
-
-export default configureStore({
- reducer: {
- counter: counterReducer,
- },
-});
-```
-
-Finally, update `src/index.js` to wrap the `App` component with the Redux Provider and pass the store:
-
-```jsx title="src/index.js"
-// src/index.js
-import React from 'react';
-import ReactDOM from 'react-dom';
-import { Provider } from 'react-redux';
-import store from './store/store';
-import App from './App';
-
-ReactDOM.render(
-
-
- ,
- document.getElementById('root')
-);
-```
-
-### Step 3: Create the Custom Template
-
-Now that we've customized our CRA project, let's turn it into a reusable template.
-
-**1. Template Folder Structure**
-
-Create a new folder named `template` in the root directory of your CRA project. Move all the files and folders (except the `node_modules` folder) from the root to this `template` folder.
-
-**2. Custom Template Package.json**
-
-In the `template` folder, create a new `package.json` file. Add the following:
-
-```json title="package.json"
-{
- "name": "my-custom-react-template",
- "version": "0.1.0",
- "dependencies": {
- "@mui/material": "^5.0.0",
- "@emotion/react": "^11.4.1",
- "@emotion/styled": "^11.3.0",
- "redux": "^4.1.1",
- "react-redux": "^7.2.5",
- "react-scripts": "4.0.3"
- }
-}
-```
-
-Note: The dependencies listed here should match the ones used in your CRA project. Additionally, update the version numbers if needed.
-
-**3. README.md**
-
-Create a `README.md` file in the `template` folder and add documentation for your custom template. Describe the purpose of the template, its features, and any additional setup or configuration instructions.
-
-### Step 4: Test Your Custom Template Locally
-
-Before publishing your template, test it locally to ensure everything works as expected.
-
-**1. Link Your Custom Template**
-
-In the root directory of your CRA project, run the following command to create a symlink for your custom template:
-
-```bash
-npm link
-```
-
-**2. Create a New Project**
-
-Now, create a new directory outside your custom template project and use the following command to generate a new CRA project using your custom template:
-
-```bash
-npx create-react-app my-custom-app --template file:../path/to/my-custom-template-app/template
-```
-
-Replace `../path/to/my-custom-template-app/template` with the actual path to your custom template.
-
-**3. Start the New Project**
-
-Move into the newly created `my-custom-app` directory and start the app:
-
-```bash
-cd my-custom-app
-npm start
-```
-
-### Conclusion
-
-Congratulations! You've successfully created your custom template in Create React App. Now you can reuse it or share it with others, making it easier to kickstart future React projects with your preferred configurations, dependencies, and folder structures. Happy coding!
\ No newline at end of file
diff --git a/docs/react/advanced-usage/pre-rendering-into-static-html-files.md b/docs/react/advanced-usage/pre-rendering-into-static-html-files.md
deleted file mode 100644
index 043c9dad5..000000000
--- a/docs/react/advanced-usage/pre-rendering-into-static-html-files.md
+++ /dev/null
@@ -1,92 +0,0 @@
----
-id: pre-rendering-into-static-html-files
-title: Pre-Rendering into Static HTML Files
-sidebar_label: Pre-Rendering Static HTML
-sidebar_position: 3
-tags: [React, Pre-Rendering, Static HTML, SEO, Performance]
-keywords: [pre-rendering, static html, react pre-rendering, react static html, pre-rendering in react, static html in react, react performance, react seo]
-description: Learn how to pre-render your React application into static HTML files to improve performance and SEO.
----
-
-If you're hosting your React application using a static hosting provider, you have a fantastic opportunity to enhance its performance and SEO by pre-rendering it into static HTML files. Pre-rendering involves generating HTML pages for each route or link in your application, making them readily available to users even before the JavaScript bundle loads. This seamless process not only improves loading times but also boosts your website's visibility on search engines.
-
-## What is Pre-Rendering and Why Use It?
-
-Pre-rendering, also known as "snapshotting," is a technique that produces static HTML versions of your dynamic React app during the build process. This means that instead of waiting for the JavaScript to load and render the content, users receive the pre-rendered HTML instantly. It greatly improves the initial loading speed, which is crucial for providing a smooth and delightful user experience.
-
-### Benefits of Pre-Rendering:
-
-1. **Faster Initial Page Load**: Users see the core content of each page even before the JavaScript bundle finishes downloading, resulting in quicker load times and reduced bounce rates.
-
-2. **Improved SEO**: Search engines can easily crawl and index static HTML pages, which enhances your website's visibility and ranking in search results.
-
-3. **Server Load Reduction**: Pre-rendering shifts the burden of generating and caching routes from the server to the build process, optimizing server performance.
-
-## How to Pre-Render with `react-snapshot` or `react-snap`
-
-Two popular libraries, `react-snapshot` and `react-snap`, can help you achieve pre-rendering in your React application:
-
-1. **react-snapshot** (Link: [npm](https://www.npmjs.com/package/react-snapshot))
-
- This library allows you to pre-render your app into static HTML pages for each route. The pages become active or "hydrated" once the JavaScript bundle loads.
-
-2. **react-snap** (Link: [npm](https://www.npmjs.com/package/react-snap))
-
- Similar to `react-snapshot`, `react-snap` also generates static HTML pages for each route or relative link in your application.
-
-## Setting Up Pre-Rendering
-
-To get started with pre-rendering using either of these libraries, follow these general steps:
-
-1. **Create a React App**:
-
- If you haven't already, create a new React app using Create React App or your preferred method.
-
-2. **Install the Chosen Library**:
-
- For `react-snapshot`, use the following command:
-
- ```bash
- npm install react-snapshot
- ```
-
- For `react-snap`, use:
-
- ```bash
- npm install react-snap
- ```
-
-3. **Configure the Build Scripts**:
-
- Open your project's `package.json` file and modify the scripts section to include the pre-rendering library's command. For example:
-
- ```json
- "scripts": {
- "prebuild": "react-snapshot", // or "react-snap" for react-snap
- "build": "react-scripts build"
- }
- ```
-
-4. **Pre-Render Your App**:
-
- Run the following command to generate static HTML pages:
-
- ```bash
- npm run build
- ```
-
-5. **Test Your Pre-Rendered App**:
-
- After the build process completes, you can serve your pre-rendered app locally to test it:
-
- ```bash
- npx serve -s build
- ```
-
- Your pre-rendered app should now be accessible at `http://localhost:5000`.
-
-## Conclusion
-
-Pre-rendering your React app into static HTML files is a game-changer in terms of performance and SEO. By serving pre-rendered content to users, you significantly improve the initial loading speed, leading to higher user satisfaction and engagement. Moreover, search engines will have an easier time indexing your pages, potentially boosting your website's visibility.
-
-So go ahead, give pre-rendering a try, and experience the remarkable benefits it brings to your React applications!
\ No newline at end of file
diff --git a/docs/react/assets/Frontend-Roadmap.pdf b/docs/react/assets/Frontend-Roadmap.pdf
deleted file mode 100644
index 7c40f8acf..000000000
Binary files a/docs/react/assets/Frontend-Roadmap.pdf and /dev/null differ
diff --git a/docs/react/assets/ReactJS-Guide.pdf b/docs/react/assets/ReactJS-Guide.pdf
deleted file mode 100644
index 988611d76..000000000
Binary files a/docs/react/assets/ReactJS-Guide.pdf and /dev/null differ
diff --git a/docs/react/assets/audio.mp3 b/docs/react/assets/audio.mp3
deleted file mode 100644
index 27cc384fd..000000000
Binary files a/docs/react/assets/audio.mp3 and /dev/null differ
diff --git a/docs/react/back-end-integration/DataFetcher.jsx b/docs/react/back-end-integration/DataFetcher.jsx
deleted file mode 100644
index 8e7b5360d..000000000
--- a/docs/react/back-end-integration/DataFetcher.jsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { useEffect, useState } from 'react';
-import axios from 'axios';
-
-const DataFetcher = () => {
- const [data, setData] = useState([]);
-
- useEffect(() => {
- const fetchData = async () => {
- try {
- const response = await axios.get('https://api.github.com/users/Ajay-Dhangar'); // Replace with your API endpoint
- setData(response.data);
- } catch (error) {
- console.error('Error fetching data:', error);
- }
- };
-
- fetchData();
- }, []);
-
- return (
-
- );
-}
-
-export default FetchDataComponent;
\ No newline at end of file
diff --git a/docs/react/back-end-integration/_category_.json b/docs/react/back-end-integration/_category_.json
deleted file mode 100644
index 4a7b67280..000000000
--- a/docs/react/back-end-integration/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "Back End Integration",
- "position": 8,
- "link": {
- "type": "generated-index",
- "description": "5 minutes to learn the most important RoadMap for React Mastery."
- }
- }
\ No newline at end of file
diff --git a/docs/react/back-end-integration/fetching-data-with-ajax-requests.md b/docs/react/back-end-integration/fetching-data-with-ajax-requests.md
deleted file mode 100644
index b6affc280..000000000
--- a/docs/react/back-end-integration/fetching-data-with-ajax-requests.md
+++ /dev/null
@@ -1,189 +0,0 @@
----
-id: fetching-data-with-ajax-requests
-title: Fetching Data with AJAX Requests in React
-sidebar_label: Fetching Data
-sidebar_position: 2
-tags: [React, AJAX, Data Fetching, API, Asynchronous]
-keywords: [fetching data in react, ajax requests in react, data fetching in react, react ajax, react fetch, react data fetching, react api]
-description: "Learn how to fetch data with AJAX requests in a React application using the `fetch()` API and the `axios` library."
----
-
-import '../css/style.css';
-
-In modern web development, retrieving data from a server and displaying it on a web page is a common task. To achieve this in React, we use AJAX (Asynchronous JavaScript and XML) requests. AJAX allows us to fetch data from a server without needing to reload the entire page.
-
-
-## Prerequisites
-
-Before we begin, make sure you have the following:
-
-1. Basic knowledge of HTML, CSS, and JavaScript.
-2. Node.js and npm (Node Package Manager) installed on your machine.
-3. A code editor of your choice, such as Visual Studio Code or Sublime Text.
-
-
-## Introduction to Fetching Data in React
-
-When building React applications, data fetching is a common requirement to interact with APIs and display dynamic content on web pages. While React doesn't enforce a specific data fetching approach, developers often use libraries like [axios](https://github.com/axios/axios) or utilize the native [`fetch()` API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) provided by modern browsers.
-
-In this guide, we'll explore how to fetch data with AJAX requests in React, and we'll focus on using the `fetch()` API as it's built into browsers, making it readily accessible.
-
-## Understanding the `fetch()` API
-
-The `fetch()` function is a powerful tool for making AJAX requests in modern web applications. It takes a URL as an input and returns a `Promise` that resolves to a `Response` object. If the request is successful, the `Response` object contains the data returned by the server.
-
-Here's a basic example of how the `fetch()` API works:
-
-```js
-fetch('https://api.github.com/users/Ajay-Dhangar')
- .then((response) => response.json())
- .then((data) => {
- // Process the data here
- console.log(data);
- })
- .catch((error) => {
- console.error('Error fetching data:', error);
- });
-```
-
-In this example, we use the `fetch()` function to make a GET request to the URL `https://api.github.com/users/Ajay-Dhangar`. We then use the `then()` method to handle the response. The `response.json()` method reads the response data and parses it as JSON. Finally, we handle the parsed data or catch any errors that occurred during the request.
-
-## Using `async / await` for a Cleaner Code
-
-While chaining `.then()` methods works well, it can lead to callback hell when dealing with multiple requests. To make the code cleaner and more readable, you can use the `async / await` syntax with `try / catch` blocks:
-
-```js
-async function fetchData() {
- try {
- const response = await fetch('https://api.github.com/users/Ajay-Dhangar');
- const data = await response.json();
- // Process the data here
- console.log(data);
- } catch (error) {
- console.error('Error fetching data:', error);
- }
-}
-
-// Call the fetchData function
-fetchData();
-```
-
-Using `async / await`, we can write asynchronous code in a more synchronous style, making it easier to understand, especially for beginners.
-
-## Compatibility Considerations
-
-Before solely relying on the `fetch()` API, ensure it's supported in your target audience's browsers. Older browsers like Internet Explorer require a [polyfill](https://github.com/facebook/create-react-app/blob/main/packages/react-app-polyfill/README.md) to use the `fetch()` API.
-
-## React and AJAX Data Fetching
-
-In a React application, you can use the `fetch()` API within components or custom hooks to fetch data from APIs. It's common to use the `useState` and `useEffect` hooks to manage the data state and trigger the data fetching process when the component mounts or when specific dependencies change.
-
-To learn more about integrating AJAX requests with React components and handling data effectively, refer to the [FAQ entry on the React website](https://reactjs.org/docs/faq-ajax.html).
-
-Remember, AJAX requests may take time to complete, so it's essential to provide proper loading indicators and error handling to create a smooth user experience.
-
-
-## For Example:
-In this guide, we'll walk you through the process of making AJAX requests in a React application using the popular tool "Create React App."
-
-### Step 1: Set Up a New React Project
-
-If you don't have a React project yet, you can create one using Create React App. Open your terminal and run the following command:
-
-```bash
-npx create-react-app my-ajax-app
-cd my-ajax-app
-```
-
-This will create a new React project called "my-ajax-app" and navigate you into its directory.
-
-### Step 2: Install Axios
-
-To make AJAX requests, we'll use Axios, a popular JavaScript library that simplifies the process of sending HTTP requests. In your terminal, run the following command to install Axios:
-
-```bash
-npm install axios
-```
-
-### Step 3: Create a Component for Fetching Data
-
-Now, let's create a new component that will handle the AJAX request. In the "src" folder of your project, create a new file called "DataFetcher.js." Open the file and add the following code:
-
-```jsx title="DataFetcher.js"
-import React, { useEffect, useState } from 'react';
-import axios from 'axios';
-
-const DataFetcher = () => {
- const [data, setData] = useState([]);
-
- useEffect(() => {
- const fetchData = async () => {
- try {
- const response = await axios.get('https://api.github.com/users/Ajay-Dhangar'); // Replace with your API endpoint
- setData(response.data);
- } catch (error) {
- console.error('Error fetching data:', error);
- }
- };
-
- fetchData();
- }, []);
-
- return (
-
-
Fetched Data
-
- {data.map((item) => (
-
{item.name}
- ))}
-
-
- );
-};
-
-export default DataFetcher;
-```
-
-In this component, we use the `useEffect` hook to fetch data from the API when the component mounts. We store the fetched data in the `data` state variable using the `useState` hook.
-
-### Step 4: Using the DataFetcher Component
-
-Now that we have our `DataFetcher` component, we can use it in our main application. Open the "src/App.js" file and replace its content with the following:
-
-```jsx
-import React from 'react';
-import DataFetcher from './DataFetcher';
-
-function App() {
- return (
-
-
My Awesome App
-
-
- );
-}
-
-export default App;
-```
-
-Here, we import and render the `DataFetcher` component within the `App` component.
-
-### Step 5: Start the Development Server
-
-Finally, start the development server to see your app in action. Run the following command in your terminal:
-
-```bash
-npm start
-```
-
-Your app will open in a new browser tab at "http://localhost:3000," showing the fetched data from the API.
-
-Congratulations! You've successfully implemented AJAX requests in your React app using Axios.
-
-## Conclusion
-
-Fetching data with AJAX requests is an integral part of building dynamic and interactive React applications. By using the `fetch()` API or libraries like axios, you can easily communicate with APIs and display data on your web pages. Additionally, leveraging `async / await` can improve the readability of your code and help manage multiple asynchronous requests more efficiently.
-
-Always keep compatibility in mind when using modern features like the `fetch()` API, and consider using polyfills for older browsers. With the knowledge of data fetching in React, you're equipped to create responsive and data-driven web applications.
-
-Happy coding and exploring the possibilities of data integration in your React journey!
diff --git a/docs/react/back-end-integration/integrating-with-an-api-backend.md b/docs/react/back-end-integration/integrating-with-an-api-backend.md
deleted file mode 100644
index 7532445ee..000000000
--- a/docs/react/back-end-integration/integrating-with-an-api-backend.md
+++ /dev/null
@@ -1,154 +0,0 @@
----
-id: integrating-with-an-api-backend
-title: Integrating with an API Backend
-sidebar_label: Integrating with an API
-sidebar_position: 3
-tags: [React, API, Backend, Integration]
-keywords: [react, api, backend, integration, axios, fetch, http, request, post, get, put, delete, data, communication, server, client, frontend, backend, fullstack, web development, javascript, node.js, express, rest, json, asynchronous, promise, async, await, state, useEffect, useState, form, submit, create, update, delete, fetch, send, receive, response, error, axios, library, package, npm, install, tool, postman, testing, endpoint, list, data, new, component, app, file, code, example, tutorial, guide, how-to, learn, step-by-step, beginner, basics, introduction, overview, explanation, example, code, source, snippet, tutorial, guide, learn, how-to, steps, react, javascript, web development, frontend, backend, fullstack, integration, api, axios, fetch, http, request, post, get, put, delete, data, communication, server, client, frontend, backend, fullstack, web development, javascript, node.js, express, rest, json, asynchronous, promise, async, await, state, useEffect, useState, form, submit, create, update, delete, fetch, send, receive, response, error, axios, library, package, npm, install, tool, postman, testing, endpoint, list, data, new, component, app, file, code, example, tutorial, guide, how-to, learn, step-by-step, beginner, basics, introduction, overview, explanation, example, code, source, snippet, tutorial, guide, learn, how-to, steps]
-description: "Learn how to integrate a React app with an API backend, enabling it to fetch and send data seamlessly."
----
-
-
-# Integrating a React App with an API Backend
-
-Welcome to CodeMastermindHQ! In this tutorial, we will guide you through the process of integrating your React app with an API backend. By the end of this guide, you'll have a solid understanding of how to connect your frontend and backend, enabling your app to fetch and send data seamlessly.
-
-## Prerequisites
-
-Before we dive into the integration process, make sure you have the following:
-
-1. Basic knowledge of React and JavaScript.
-2. Node.js and npm (Node Package Manager) installed on your computer.
-3. A backend API (you can use an existing API or create a simple one for testing purposes).
-
-## Step 1: Set Up Your React App
-
-If you don't have a React app yet, you can create one using Create React App. Open your terminal and run the following command:
-
-```bash
-npx create-react-app my-react-app
-cd my-react-app
-```
-
-This will generate a new React app in a folder named `my-react-app`. Navigate into the folder using `cd my-react-app`.
-
-## Step 2: Install Dependencies
-
-Next, you need to install some additional packages that will help you perform API requests from your React app. Install the `axios` library by running the following command:
-
-```bash
-npm install axios
-```
-
-Axios is a popular JavaScript library used to make HTTP requests, which will be handy when communicating with your backend API.
-
-## Step 3: Define Your API Backend
-
-Before we integrate our React app, ensure your backend API is up and running. Your backend should have a set of endpoints that the frontend can communicate with. For demonstration purposes, let's assume you have the following endpoints:
-
-- `GET /api/posts`: Retrieves a list of posts from the backend.
-- `POST /api/posts`: Creates a new post on the backend.
-
-You can use a tool like Postman to test your backend API and verify that these endpoints are working as expected.
-
-## Step 4: Making API Requests
-
-Now, it's time to integrate your React app with the backend API. Open the file `src/App.js` in your React project, which is the main component of your app.
-
-### Fetching Data from the Backend
-
-To fetch data from the backend API, you can use the `axios` library we installed earlier. In your `App.js` file, add the following code to fetch a list of posts:
-
-```javascript title="App.js"
-import React, { useState, useEffect } from 'react';
-import axios from 'axios';
-
-const App = () => {
- const [posts, setPosts] = useState([]);
-
- useEffect(() => {
- axios.get('/api/posts')
- .then(response => {
- setPosts(response.data);
- })
- .catch(error => {
- console.error('Error fetching data:', error);
- });
- }, []);
-
- return (
-
-
My React App
-
- {posts.map(post => (
-
{post.title}
- ))}
-
-
- );
-};
-
-export default App;
-```
-
-In this code, we use the `useState` and `useEffect` hooks from React to manage the state of the `posts` array. The `useEffect` hook makes an HTTP GET request to `/api/posts` when the component mounts. The response data is then used to update the `posts` state, and the list of posts is displayed in the app.
-
-### Sending Data to the Backend
-
-To send data to the backend API, such as creating a new post, you can add a form in your `App.js` file:
-
-```javascript title="App.js"
-// ... (above code)
-
-const App = () => {
- // ... (existing code)
-
- const handleSubmit = (event) => {
- event.preventDefault();
-
- const newPost = {
- title: event.target.title.value,
- body: event.target.body.value,
- };
-
- axios.post('/api/posts', newPost)
- .then(response => {
- // If successful, update the state with the new post
- setPosts([...posts, response.data]);
- })
- .catch(error => {
- console.error('Error creating post:', error);
- });
-
- // Clear the form fields after submitting
- event.target.reset();
- };
-
- return (
-
-
My React App
-
-
- {posts.map(post => (
-
{post.title}
- ))}
-
-
- );
-};
-
-export default App;
-```
-
-In this code, we added a form with inputs for the title and body of the post. When the form is submitted, the `handleSubmit` function is called, which captures the values of the form fields and sends a POST request to `/api/posts`. If the request is successful, the new post is added to the `posts` state, and the list is updated automatically.
-
-## Conclusion
-
-Congratulations! You've successfully integrated your React app with an API backend. You can now fetch data from the backend and send data to it, enabling your app to interact with a server and provide a richer user experience.
-
-Remember, this is just the beginning of your journey into building powerful React apps with backend integration. As you progress, you'll encounter more complex scenarios and additional features to implement. Keep exploring and building, and happy coding!
-
diff --git a/docs/react/back-end-integration/proxying-api-requests-in-development.md b/docs/react/back-end-integration/proxying-api-requests-in-development.md
deleted file mode 100644
index adb8ac3c2..000000000
--- a/docs/react/back-end-integration/proxying-api-requests-in-development.md
+++ /dev/null
@@ -1,236 +0,0 @@
----
-id: proxying-api-requests-in-development
-title: Proxying API Requests in Development
-sidebar_label: Proxying API Requests
-sidebar_position: 1
-tags: [React, API, Backend, Integration, Proxy]
-keywords: [react, api, backend, integration, proxy, proxying, cors, development, server, client, frontend, backend, fullstack, web development, javascript, node.js, express, rest, json, asynchronous, promise, async, await, state, useEffect, useState, form, submit, create, update, delete, fetch, send, receive, response, error, axios, library, package, npm, install, tool, postman, testing, endpoint, list, data, new, component, app, file, code, example, tutorial, guide, how-to, learn, step-by-step, beginner, basics, introduction, overview, explanation, example, code, source, snippet, tutorial, guide, learn, how-to, steps]
-description: "Learn how to proxy API requests during development in a React app using Create React App, avoiding CORS issues and enabling seamless interaction with your backend server."
----
-
-import '../css/style.css'
-
-When building a React app, you might encounter a common scenario where your frontend and backend are served from different hosts or ports. This separation could lead to [CORS issues](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) during development, causing your API requests to fail and producing error messages in your browser console.
-
-To tackle this problem and make your development process smoother, Create React App offers a straightforward way to proxy API requests during development. In this guide, we'll explore how to set up proxying, understand its benefits, and handle some common issues that might arise.
-
-
-## Introduction:
-In this guide, we'll explore how to efficiently handle API requests during the development of your React app using Create React App (CRA). Proxying API requests is a crucial step to avoid CORS issues and seamlessly interact with your backend server while developing locally. We'll break down the process step-by-step and sprinkle in some fun details to make your learning journey enjoyable!
-
-## Section 1: Setting up a Create React App project
-Before we delve into proxying API requests, let's set up a new Create React App project to get started:
-
-### Step 1: Install Create React App
-First, ensure you have Node.js and npm installed on your machine. Open your terminal and run the following command:
-
-```bash
-npx create-react-app my-react-app
-```
-
-### Step 2: Navigate to your project
-Next, move into your newly created project directory:
-
-```bash
-cd my-react-app
-```
-
-### Step 3: Start the development server
-To launch your React app in development mode, run:
-
-```bash
-npm start
-```
-
-Now your app should be running at `http://localhost:3000/`.
-
-
-
-
-
-## Section 2: Understanding the need for proxying API requests
-When you develop a React app, you'll often need to fetch data from an API hosted on a different domain or port. Browsers enforce a security feature called the Same-Origin Policy, which restricts cross-origin requests. As a result, you might encounter CORS errors when trying to access the API directly from your React app.
-
-Proxying solves this problem by creating a tunnel between your frontend and backend, allowing you to make requests as if they were originating from the same domain.
-
-## What is Proxying in Development?
-
-Proxying is a technique used to redirect certain requests from one server to another. In the context of Create React App, we can use proxying to redirect our API requests from the development server (running on, for example, `http://localhost:3000`) to our backend server (e.g., `http://localhost:4000`).
-
-By setting up a proxy, you can avoid CORS-related headaches during development and make API requests as if they were coming from the same host and port as your frontend, simplifying your code and making your development environment more comfortable.
-
-## Setting Up Proxying
-
-Create React App makes proxying API requests incredibly easy. To get started, follow these steps:
-
-1. Locate the `proxy` Field:
-
-In your React app's `package.json` file, add a `proxy` field. This field specifies the address of your backend API server.
-
-```json title="package.json"
-{
- "name": "your-react-app",
- "version": "x.x.x",
- "proxy": "http://localhost:4000",
- // ... other configurations ...
-}
-```
-
-2. Restart the Development Server:
-
-Once you've added the `proxy` field, stop your development server (if it's running) and start it again using the command `npm start`. This will activate the proxy settings and enable you to make API requests from your React app without encountering CORS issues.
-
-
-## Section 3: Configuring proxy in Create React App
-Now, let's configure the proxy for our API requests in the Create React App project:
-
-### Step 1: Create a `setupProxy.js` file
-Inside the `src` folder of your project, create a file named `setupProxy.js`. This file will contain our proxy configuration.
-
-### Step 2: Install http-proxy-middleware
-To set up the proxy, we need a middleware package called `http-proxy-middleware`. Install it by running:
-
-```bash
-npm install http-proxy-middleware --save
-```
-
-### Step 3: Proxy configuration
-In the `setupProxy.js` file, add the following code to set up the proxy for your API:
-
-```javascript title="setupProxy.js "
-const { createProxyMiddleware } = require('http-proxy-middleware');
-
-module.exports = function(app) {
- app.use(
- '/api',
- createProxyMiddleware({
- target: 'http://your-backend-server.com',
- changeOrigin: true,
- })
- );
-};
-```
-
-Replace `'http://your-backend-server.com'` with the base URL of your backend server.
-
-## Section 4: Fetching data from the API
-With the proxy set up, you can now fetch data from your backend server without worrying about CORS issues. Let's create a sample API request to illustrate this:
-
-```javascript title="App.js"
-import React, { useState, useEffect } from 'react';
-
-function App() {
- const [data, setData] = useState([]);
-
- useEffect(() => {
- fetch('/api/data') // This will be proxied to 'http://your-backend-server.com/api/data'
- .then((response) => response.json())
- .then((data) => setData(data))
- .catch((error) => console.error('Error fetching data:', error));
- }, []);
-
- return (
-
-
Welcome to My React App
-
- {data.map((item) => (
-
{item.name}
- ))}
-
-
- );
-}
-
-export default App;
-```
-
-## "Invalid Host Header" Error and How to Handle It
-
-In some cases, after configuring the proxy, you might encounter an "Invalid Host Header" error when developing remotely. This issue arises due to stricter host checks to prevent DNS rebinding attacks.
-
-To resolve this error, create a `.env.development` file at the root of your project and specify your public development host:
-
-```
-HOST=mypublicdevhost.com
-```
-
-Restart the development server, and the error should disappear.
-
-:::note
-If you're using a more exotic environment like a cloud editor, you can bypass the host check entirely, but this is risky and not recommended:
-:::
-
-```ini
-# NOTE: THIS IS DANGEROUS!
-# It exposes your machine to attacks from the websites you visit.
-DANGEROUSLY_DISABLE_HOST_CHECK=true
-```
-
-Use this approach with caution and only when necessary.
-
-## Configuring the Proxy Manually (Advanced Option)
-
-While the built-in `proxy` field in `package.json` works well for most cases, there might be situations where you need more flexibility. In such cases, you can configure the proxy manually by setting up a `setupProxy.js` file in your `src` directory.
-
-Here's how:
-
-1. Install `http-proxy-middleware`:
-
-```sh
-$ npm install http-proxy-middleware --save
-$ # or
-$ yarn add http-proxy-middleware
-```
-
-2. Create `src/setupProxy.js`:
-
-```javascript
-const { createProxyMiddleware } = require('http-proxy-middleware');
-
-module.exports = function (app) {
- app.use(
- '/api',
- createProxyMiddleware({
- target: 'http://localhost:5000',
- changeOrigin: true,
- })
- );
-};
-```
-:::note
-This file is automatically registered when you start the development server, so there's no need to import it elsewhere.
-:::
-
-By using the manual setup, you gain more control over your proxy configuration, allowing for advanced routing and customization.
-
-:::tip Additional Configuration
-
-For more advanced use cases, you can configure multiple proxies, custom headers, and other options.
-
-Check out the [official documentation](https://create-react-app.dev/docs/proxying-api-requests-in-development/#configuring-the-proxy-manually) for detailed information on manual proxy configuration.
-
-:::
-
-
-## Conclusion:
-Congratulations! You've successfully learned how to proxy API requests during development with Create React App. By using proxying, you've simplified your development environment and avoided troublesome CORS issues.
-
-Whether you choose the built-in `proxy` field or the more flexible manual setup, understanding how to handle API requests effectively will boost your productivity and make building React apps a delightful experience.
-
-Now that you've mastered proxying, you're ready to build amazing apps with seamless frontend-backend communication. Keep coding and have fun!
\ No newline at end of file
diff --git a/docs/react/back-end-integration/title-and-meta-tags.md b/docs/react/back-end-integration/title-and-meta-tags.md
deleted file mode 100644
index ead19fb17..000000000
--- a/docs/react/back-end-integration/title-and-meta-tags.md
+++ /dev/null
@@ -1,67 +0,0 @@
----
-id: title-and-meta-tags
-title: Title And Meta Tags
-sidebar_label: Title & Meta Tags
-sidebar_position: 4
-tags: [title, meta, tags, react, create react app, seo, search engine optimization, server, server-side, back-end, integration]
-keywords: [title, meta, tags, react, create react app, seo, search engine optimization, server, server-side, back-end, integration]
-description: Learn how to handle title and meta tags in your Create React App for back-end integration, making your website more appealing and discoverable.
----
-
-import '../css/style.css'
-
-In web development, title and meta tags play a crucial role in optimizing your website for search engines and providing a better user experience. They are like a website's introduction, giving a sneak peek into what visitors can expect. In this guide, we will explore how to handle title and meta tags in your Create React App for back-end integration, making your website more appealing and discoverable.
-
-### Changing the Title Tag
-
-The first step to customizing your website's title is to locate the source HTML file in the `public` folder of your generated Create React App project. There, you'll find the `` tag, which you can modify to display your desired title instead of the default "React App."
-
-:::tip
-Editing files in the `public` folder should be done sparingly. For most changes, like adding a stylesheet, you can do so without touching the HTML.
-:::
-
-If you need to dynamically update the page title based on the content or perform more complex title changes from React components, you can use the [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more advanced scenarios, where you want to manage title and meta tags with ease, consider using the popular third-party library, [React Helmet](https://github.com/nfl/react-helmet).
-
-### Generating Dynamic Meta Tags on the Server
-
-Create React App doesn't support server rendering by default, which might leave you wondering how to make `` tags dynamic and responsive to the current URL. To tackle this challenge, we recommend using placeholders in your HTML.
-
-```html title="index.html"
-
-
-
-
-
-
-
-```
-
-On your server, regardless of the backend you use, read the `index.html` file into memory and replace the `__OG_TITLE__`, `__OG_DESCRIPTION__`, and any other placeholders with actual values based on the current URL. It's crucial to sanitize and escape these interpolated values to ensure they are safe to embed into HTML.
-
-If you're using a Node server, you can even share the route matching logic between the client and the server, although duplicating it in basic cases works fine.
-
-### Injecting Data from the Server into the Page
-
-Another powerful technique is injecting data from the server into your page, enabling you to pass global variables to your client-side JavaScript.
-
-
-```html title="index.html"
-
-
-
-
-
-
-```
-
-On the server, replace `__SERVER_DATA__` with a JSON object containing real data before sending the response. The client-side code can then read `window.SERVER_DATA` to access and use this data.
-
-:::warning
-Remember to sanitize the JSON before sending it to the client to prevent XSS attacks. Always prioritize security!
-:::
-
-## Conclusion:
-
-Congratulations! You've learned how to handle title and meta tags in your Create React App for back-end integration. By customizing your title and meta tags, you can enhance your website's visibility in search engines and deliver a better experience to your users. Remember to use React Helmet for more advanced management of your head elements and be cautious when dealing with server-side data to ensure security. Happy coding and creating!
\ No newline at end of file
diff --git a/docs/react/building-your-app/_category_.json b/docs/react/building-your-app/_category_.json
deleted file mode 100644
index 898c0f562..000000000
--- a/docs/react/building-your-app/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "Building Your App",
- "position": 6,
- "link": {
- "type": "generated-index",
- "description": "5 minutes to learn the most important RoadMap for React Mastery."
- }
- }
\ No newline at end of file
diff --git a/docs/react/building-your-app/adding-a-router.md b/docs/react/building-your-app/adding-a-router.md
deleted file mode 100644
index 56c7afee1..000000000
--- a/docs/react/building-your-app/adding-a-router.md
+++ /dev/null
@@ -1,102 +0,0 @@
----
-id: adding-a-router
-title: Adding a Router
-sidebar_position: 8
-tags: [react, react router, routing, react app, single-page application, spa, create react app, navigation, links, components]
-keywords: [react, react router, routing, react app, single-page application, spa, create react app, navigation, links, components]
-description: Learn how to add routing capabilities to your React app using React Router, enabling dynamic, multi-page applications without full-page refreshes.
----
-
-## Introduction:
-Welcome, fellow Coders! Today, we embark on an exciting journey to enhance our React app by adding routing capabilities. Routing allows us to create dynamic, multi-page applications without the need for full-page refreshes. Buckle up, and let's dive into the world of React Router!
-
-### 1: What is React Router?
-React Router is a popular library that enables navigation and routing within a React application. It provides a seamless way to create multiple pages while maintaining a single-page app feel. Think of it as a virtual GPS system for your app, guiding users to different views without reloading the entire page.
-
-### 2: Getting Started
-Before we hit the road, let's set up our project! Make sure you have Node.js and npm installed. If not, visit Node.js' official website and follow their easy installation guide.
-
-Once you have everything set up, create your React app using Create React App (CRA). In your terminal, type:
-
-```bash
-npx create-react-app my-awesome-app
-cd my-awesome-app
-```
-
-Now, we're ready to install React Router. Execute the following command:
-
-```bash
-npm install react-router-dom
-```
-
-### 3: Creating Our Routes
-Imagine your app is a fantastic theme park, and each attraction represents a different page. Let's map out our routes accordingly:
-
-1. **Home:** The main entrance to our park, where visitors start their journey.
-2. **About:** An information booth to learn more about our park's history.
-3. **Contact:** A helpline where visitors can reach out for any queries.
-4. **NotFound:** A secret portal to another dimension for lost URLs (404 page).
-
-### 4: Setting Up the Router
-Now that we have our routes planned out, let's integrate React Router into our app. Open the `src/App.js` file, and let the routing magic begin:
-
-```jsx title="src/App.js"
-import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
-import Home from './components/Home';
-import About from './components/About';
-import Contact from './components/Contact';
-import NotFound from './components/NotFound';
-
-function App() {
- return (
-
-
-
-
-
-
-
-
- );
-}
-```
-
-### 5: Creating Our Components
-To keep our code organized, let's create separate components for each route we defined earlier. For instance, create `Home.js`, `About.js`, `Contact.js`, and `NotFound.js` in the `src/components` folder. Don't forget to sprinkle some code wizardry into each component to make them shine!
-
-### 6: Linking It All Together
-Now that we have our routes and components set up, we need navigation links for our visitors to explore the park. Update your `src/components/Home.js` with the following code:
-
-```jsx title="src/components/Home.js"
-import { Link } from 'react-router-dom';
-
-function Home() {
- return (
-
-
Welcome to Code Mastermind Theme Park!
-
-
- );
-}
-```
-### 7: Celebrate Your Success!
-Congratulations, Code Mastermind! You've successfully added React Router to your app, making it dynamic and user-friendly. Now, users can roam freely through your theme park without ever getting lost.
-
-### Apply your Idea's
-
-[Contribution Now](https://github.com/Ajay-Dhangar/react-blog-app/tree/main/)
-
-## Conclusion:
-Routing in React is like a thrilling roller coaster ride for developers. We've just scratched the surface of what React Router can do. So keep exploring, experimenting, and creating breathtaking experiences for your users. Until next time, happy coding, Code Masterminds! 🎢
diff --git a/docs/react/building-your-app/adding-bootstrap.md b/docs/react/building-your-app/adding-bootstrap.md
deleted file mode 100644
index f49c0ade7..000000000
--- a/docs/react/building-your-app/adding-bootstrap.md
+++ /dev/null
@@ -1,195 +0,0 @@
----
-id: adding-bootstrap
-title: Adding Bootstrap
-sidebar_position: 4
-tags: [react, create react app, bootstrap, css, styling, components, responsive, layout, design, ui, user interface, integration]
-keywords: [react, create react app, bootstrap, css, styling, components, responsive, layout, design, ui, user interface, integration, npm, install, package, library, framework, pre-designed, enchanting, styles, responsive, layouts, components, buttons, forms, grid, system, columns, rows, container, app, project, example, tutorial, guide, how-to, learn, step-by-step, beginner, basics, introduction, overview, explanation, example, code, source, snippet, tutorial, guide, learn, how-to, steps]
-description: Learn how to integrate Bootstrap into your Create React App, unlocking the power of pre-designed components, responsive layouts, and enchanting styles.
----
-
-import './style.css'
-
-
-:::tip
-Welcome, aspiring Coders! In this guide, we'll unlock the power of Bootstrap and elevate your Create React App to new heights of elegance and style.
-:::
-
-## Embrace the Magic of Bootstrap
-
-Bootstrap, a legendary CSS framework, bestows upon you a treasure trove of pre-designed components, responsive layouts, and enchanting styles. To wield its power, we shall embark on a mystical journey to integrate it into your Create React App.
-
-### Unleash Bootstrap with npm
-
-First, you need to install Bootstrap as one of your app's dependencies using npm. Open your terminal and type this arcane incantation:
-
-```bash
-npm install bootstrap
-```
-
-The magical npm spirits will work their wonders, and Bootstrap will be summoned to your project.
-
-### Empower Your App with Bootstrap's Styling
-
-Now that Bootstrap resides within your project, it's time to harness its styles. Open the `src/index.js` file, the very heart of your application, and invoke the Bootstrap magic by adding the following line at the top:
-
-```javascript
-import 'bootstrap/dist/css/bootstrap.min.css';
-```
-
-With this spell, Bootstrap's captivating styles will weave their way into your app, imbuing it with elegance.
-
-## Casting Spells with Bootstrap Components
-
-Prepare to be amazed by Bootstrap's wondrous components! From spellbinding buttons to mysterious modals, you can now summon them with ease.
-
-### Invoking Buttons
-
-Buttons are the building blocks of any magical user interface. To conjure a Bootstrap button, simply create an element with the `btn` class:
-
-```jsx title="MagicalButton,jsx"
-import React from 'react';
-
-function MagicalButton() {
- return (
-
- );
-}
-```
-
-**Live Preview:**
-
-
-
-
-
-
-
-### Live Coding:
-
-apply (try your self) other like: `btn-primary`, `btn-secondary`, `btn-success`, `btn-danger`, `btn-warning`, etc.
-
-```jsx live
-function MagicalButton() {
- return (
-
- );
-}
-```
-
-### Enchanting Forms
-
-Spice up your forms with Bootstrap's form components. Behold, an input with the `form-control` class:
-
-```jsx title="MagicalForm.jsx"
-import React from 'react';
-
-function MagicalForm() {
- return (
-
- );
-}
-```
-
-**Live Preview:**
-
-
-
-
-
-
-
-### Creating Responsive Layouts
-
-Bootstrap's responsive grid system grants you the ability to craft captivating layouts for any screen size. Embrace the power of rows and columns:
-
-```jsx title="ResponsiveLayout.jsx"
-import React from 'react';
-
-function ResponsiveLayout() {
- return (
-
-
-
-
This is the left column.
-
-
-
This is the right column.
-
-
-
- );
-}
-```
-
-**Live Preview:**
-
-
-
-
-
-
This is the left column.
-
-
-
This is the right column.
-
-
-
-
-
-## A Grand Finale - A Live Example
-
-And now, for the grand finale, a live example demonstrating the fusion of React and Bootstrap. Witness the creation of a stunning app showcasing Bootstrap's magic:
-
-```jsx title="MagicalApp.jsx"
-import React from 'react';
-import 'bootstrap/dist/css/bootstrap.min.css';
-
-function MagicalApp() {
- return (
-
-
Welcome to the Magical World of React and Bootstrap!
-
Prepare to be enchanted by the wonders they create together.
-
-
-
-
-
-
-
Discover Your Powers
-
Embark on a journey of coding mastery as you learn the secrets of React and the magic of Bootstrap. Your powers shall know no bounds!
Welcome to the Magical World of React and Bootstrap!
-
Prepare to be enchanted by the wonders they create together.
-
-
-
-
-
-
Discover Your Powers
-
Embark on a journey of coding mastery as you learn the secrets of React and the magic of Bootstrap. Your powers shall know no bounds!
-
-
-
-
-
-
-By reciting this mystical incantation, you shall witness the wonders of React and Bootstrap merging in harmony, crafting an exquisite and responsive user interface.
-
-May this knowledge serve as your guide in the mesmerizing realms of React and Bootstrap. May you code with joy and spread magic across the web!
-
-### Celebrate Your Success!
-
-You have successfully integrated Bootstrap into your Create React App, unlocking the power of pre-designed components, responsive layouts, and enchanting styles. Your app now radiates elegance and charm, ready to captivate the world.
\ No newline at end of file
diff --git a/docs/react/building-your-app/adding-custom-environment-variables.md b/docs/react/building-your-app/adding-custom-environment-variables.md
deleted file mode 100644
index 7eb96d2ec..000000000
--- a/docs/react/building-your-app/adding-custom-environment-variables.md
+++ /dev/null
@@ -1,132 +0,0 @@
----
-id: adding-custom-environment-variables
-title: Adding Custom Environment Variables
-sidebar_label: Environment Variables
-sidebar_position: 9
-tags: [environment, variables, env, custom, create react app, react, react-scripts, node, node.js, npm, start, build, test, production, development, local, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret,]
-keywords: [environment, variables, env, custom, create react app, react, react-scripts, node, node.js, npm, start, build, test, production, development, local, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret, sensitive, information, security, configuration, settings, dynamic, value, html, css, js, bundle, server, placeholders, dotenv, expand, server, client, runtime, embed, build-time, process, api, key, secret,]
-description: Learn how to add custom environment variables to your Create React App, empowering your app to configure differently based on the environment in which it runs.
----
-
-Welcome, aspiring Coders, to the enchanting world of React development! In this guide, we will explore the magical realm of custom environment variables and how they empower your React applications.
-
-:::note
-This feature is available with `react-scripts@0.2.3` and higher.
-:::
-
-
-## Introduction to Environment Variables
-
-Environment variables are like magical keys that unlock hidden powers for your React app. They allow you to configure your app differently based on the environment in which it runs. With Create React App, you get two special environment variables by default: `NODE_ENV` and any variable starting with `REACT_APP_`.
-
-:::caution Warning
-Never store sensitive information like private API keys in your React app! Environment variables are embedded into the build, making them accessible to anyone inspecting your app's files.
-:::
-
-## Understanding Build-time Embedding
-
-During the build process, Create React App embeds the environment variables into the static HTML/CSS/JS bundle. As a result, your app cannot access or change these variables at runtime. If you need dynamic values at runtime, you'd have to load HTML into memory on the server and replace placeholders. Alternatively, rebuild your app on the server each time the variables change.
-
-## Creating Custom Environment Variables
-
-To create custom environment variables, you must name them starting with `REACT_APP_`. Any other variables, except for `NODE_ENV`, will be ignored to prevent accidental exposure of private keys.
-
-For instance, to define a variable `REACT_APP_API_KEY`, you can do it in two ways:
-
-### Method 1: Shell Environment Variables (Temporary)
-
-For a temporary solution during your current shell session:
-
-#### Windows (cmd.exe)
-
-```cmd
-set "REACT_APP_API_KEY=your-api-key" && npm start
-```
-
-#### Windows (Powershell)
-
-```Powershell
-($env:REACT_APP_API_KEY = "your-api-key") -and (npm start)
-```
-
-#### Linux, macOS (Bash)
-
-```sh
-REACT_APP_API_KEY=your-api-key npm start
-```
-
-### Method 2: .env File (Permanent)
-
-For permanent environment variables, create a file called `.env` in the root of your project and define your variables like this:
-
-```
-REACT_APP_API_KEY=your-api-key
-```
-
-:::tip
-Environment variables defined in `.env` should be kept secret and not committed to source control.
-:::
-
-### Using Custom Environment Variables in Your App
-
-Once you've defined your custom variables, you can access them in your code via `process.env`. For example, let's display the API key and the current environment in a component:
-
-```jsx title="MyComponent.jsx"
-import React from 'react';
-
-const MyComponent = () => {
- return (
-
-
Your API key: {process.env.REACT_APP_API_KEY}
-
You are running in {process.env.NODE_ENV} mode.
-
- );
-};
-
-export default MyComponent;
-```
-
-During the build process, `process.env.REACT_APP_API_KEY` will be replaced with the actual value you defined in the environment variable. The value of `process.env.NODE_ENV` will be set automatically based on the build type: `'development'`, `'test'`, or `'production'`.
-
-## Leveraging Environment Variables in the HTML
-
-Starting with `react-scripts@0.9.0`, you can also use environment variables in `public/index.html`. For example:
-
-```html
-%REACT_APP_WEBSITE_NAME%
-```
-
-Remember the same naming convention applies: the variable must start with `REACT_APP_`.
-
-## More `.env` Files and Environment-specific Settings
-
-From `react-scripts@1.0.0`, Create React App allows you to use different `.env` files for various environments:
-
-- `.env`: Default file.
-- `.env.local`: Local overrides for all environments except `test`.
-- `.env.development`, `.env.test`, `.env.production`: Environment-specific settings.
-- `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides for environment-specific settings.
-
-When multiple `.env` files are present, they follow the priority order:
-
-- `npm start`: `.env.development.local`, `.env.local`, `.env.development`, `.env`
-- `npm run build`: `.env.production.local`, `.env.local`, `.env.production`, `.env`
-- `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing)
-
-Environment-specific variables serve as defaults if not explicitly set on the machine.
-
-## Expanding Variables in `.env`
-
-With `react-scripts@1.1.0` and higher, you can use variables already defined on your machine within your `.env` file using [dotenv-expand](https://github.com/motdotla/dotenv-expand). For example:
-
-```
-REACT_APP_VERSION=$npm_package_version
-# or
-REACT_APP_VERSION=${npm_package_version}
-```
-
-## Conclusion
-
-You've now mastered the art of adding custom environment variables to your Create React App! These magical keys will help you configure your app in various environments while keeping sensitive information secure. Remember to handle secrets carefully and avoid committing them to source control.
-
-Happy coding, and may your React apps enchant users across the realms of the web!
diff --git a/docs/react/building-your-app/adding-flow.md b/docs/react/building-your-app/adding-flow.md
deleted file mode 100644
index e5d45e9f6..000000000
--- a/docs/react/building-your-app/adding-flow.md
+++ /dev/null
@@ -1,197 +0,0 @@
----
-id: adding-flow
-title: Adding Flow
-sidebar_position: 5
-tags: [flow, static, type, checker, create react app, react, javascript, type safety, bug prevention, type annotations, union types, optional types, type checking, type errors, live example, flow-bin, flowconfig, vscode, vim, lsp, absolute imports, type annotations, union types, optional types, type checking, type errors, live example, flow-bin, flowconfig, vscode, vim, lsp, absolute imports]
-keywords: [flow, static, type, checker, create react app, react, javascript, type safety, bug prevention, type annotations, union types, optional types, type checking, type errors, live example, flow-bin, flowconfig, vscode, vim, lsp, absolute imports, type annotations, union types, optional types, type checking, type errors, live example, flow-bin, flowconfig, vscode, vim, lsp, absolute imports]
-description: Learn how to add Flow, a static type checker, to your Create React App, empowering your code with type safety and bug prevention.
----
-
-Flow, a formidable static type checker, stands ready to protect your code from lurking bugs. Fear not, for we shall guide you on this thrilling journey into the realm of static types in JavaScript. If you are new to this concept, fear not! Delve into this [enchanting introduction](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) to discover the power of static types.
-
-:::note
-Recent versions of [Flow](https://flow.org/) seamlessly integrate with Create React App projects.
-:::
-
-## Introduction:
-Welcome, aspiring Code Masterminds, to the magical world of Create React App! In this guide, we will delve into the realm of type checking and unveil the powers of Flow to bring order and certainty to your React applications. Prepare to embark on an adventure of static typing and fearless coding!
-
-[Flow's documentation](https://flow.org/)
-
-### 1: Introducing Flow - The Guardian of Types
-
-Meet Flow, a stalwart guardian bestowed upon us by the ancient sorcerers at Facebook. Flow is a static type checker that adds an extra layer of protection to your JavaScript code, ensuring that it adheres to predefined types and preventing sneaky bugs from infiltrating your app.
-
-
-### 2: Unleashing Flow in Your Create React App (Dance of Installation)
-
-Let us begin our quest by integrating Flow into your Create React App project. Fear not, for the path is straightforward.
-
-Prepare to summon Flow into your Create React App project by performing a few delicate steps:
-
-1. Utter the incantation `npm install --save flow-bin` (or `yarn add flow-bin`) to add Flow to your magical dependencies.
-2. Inscribe the sacred command `"flow": "flow"` into the `scripts` section of your `package.json` to harness Flow's power.
-3. Invoke the initiation ritual `npm run flow init` (or `yarn flow init`) to conjure a [`.flowconfig` file](https://flow.org/en/docs/config/) at your project's core.
-4. Fortify your code with the mark of Flow - `// @flow`. Bestow this incantation upon any files you wish to bless with type checking, such as `src/App.js`.
-
-### 3: Unleashing the Magic
-
-Behold the power Flow bestows upon you! With a simple command, `npm run flow` (or `yarn flow`), Flow will roam through your files, inspecting for lurking bugs and ensuring harmony among types.
-
-Let us not forget the comforts of modern coding. Embrace extensions like [Flow Language Support](https://github.com/flowtype/flow-for-vscode) for Visual Studio Code or the wondrous Language Server Protocol standard (e.g. [vim LSP](https://github.com/prabirshrestha/vim-lsp/wiki/Servers-Flow)) to receive hints as you weave your code.
-
-### 4: The Elegance of Absolute Imports
-
-Should you seek the elegance of absolute imports while dancing with Flow, heed this secret. Enchant your `.flowconfig` with the following:
-
-```diff
- [options]
-+ module.name_mapper='^\([^\.].*\)$' -> '/src/\1'
-```
-
-Let the magic of this incantation make Flow aware of your desires.
-
-### 5: Casting Spells - Annotating Your Code with Types
-
-Now that Flow is up and running, it's time to adorn your code with type annotations. Brace yourself, for the power of type annotations will make your code more robust and comprehensible.
-
-```js
-// @flow
-function addNumbers(a: number, b: number): number {
- return a + b;
-}
-
-const result: number = addNumbers(4, 5);
-```
-
-Observe how the `number` type annotations indicate that `a` and `b` are expected to be numbers, and the function itself will return a number. Flow will diligently check if the types match during development, sparing you the anguish of runtime errors.
-
-### 6: Magical Unions and Optional Types
-
-Flow bestows upon us the gift of union types, allowing variables to possess multiple possible types. Behold this example:
-
-```javascript
-// @flow
-function getLength(value: string | Array): number {
- return value.length;
-}
-```
-
-In this spellbinding incantation, `value` can be either a string or an array. Flow gracefully accepts this union of types and validates the code accordingly.
-
-Moreover, Flow also offers the blessing of optional types. Take a look:
-
-```javascript
-// @flow
-type User = {
- name: 'Ajay Dhangar',
- age?: 22,
-};
-
-function getUserInfo(user: User): string {
- if (user.age) {
- return `Name: ${user.name}, Age: ${user.age}`;
- } else {
- return `Name: ${user.name}`;
- }
-}
-```
-
-Here, the `age` property of the `User` type is marked as optional with the `?` symbol. Flow acknowledges this optionality and allows for graceful handling within the `getUserInfo` function.
-
-### 7: Vanquishing Bugs - Leveraging Flow's Power
-
-Flow is not just about type annotations; it also possesses the power to unearth hidden bugs lurking within your code. With a simple command, `npx flow`, Flow will perform static analysis on your codebase, detecting potential type errors and revealing them to you. Let Flow guide you on your path to bug-free coding!
-
-### 8: The Spell of a Live Example
-
-In the grand tradition of Code Mastermind HQ, behold a live example to witness the power of Flow in action. Brace yourself as you explore this enchanting example, complete with code snippets and a detailed explanation:
-
-## Live Example For Better Understanding
-
-Absolutely! Here's a simple working live example of using Flow in a Create React App. This example demonstrates how to add type annotations to a component's props and state, and how Flow helps to catch type errors during development.
-
-1. Create a new React app using Create React App:
-
- ```bash title="terminal (bash)"
- npx create-react-app flow-example-app
- cd flow-example-app
- ```
-
-2. Install Flow:
-
- ```bash title="terminal (bash)"
- npm install --save flow-bin
- ```
-
-3. Initialize Flow:
-
- ```bash title="terminal (bash)"
- npx flow init
- ```
-
-4. Add `// @flow` to `App.js` to enable type checking:
-
- ```js title="App.js"
- // App.js
- // @flow
- import React, { Component } from 'react';
-
- type Props = {
- name: 'Ajay',
- };
-
- type State = {
- age: 23,
- };
-
- class App extends Component {
- state = {
- age: 25,
- };
-
- render() {
- const { name } = this.props;
- const { age } = this.state;
-
- return (
-
-
Hello, {name}!
-
You are {age} years old.
-
- );
- }
- }
-
- export default App;
- ```
-
-5. Run the app and check for type errors:
-
- ```bash
- npm start
- ```
-
-6. You can now access the app at `http://localhost:3000`. The component `App` now expects a `name` prop of type `string`, and its state contains an `age` property of type `number`.
-
-
-
-
Hello, name: Ajay!
-
You are 23 years old.
-
-
-
- If you attempt to use the component without providing the `name` prop or try to set the `age` to a non-numeric value, Flow will catch these type errors and display them in your terminal.
-
- With this live example, you can witness how Flow enhances your React app's robustness and detects potential type-related issues during development, saving you from future bugs and headaches.
-
- Remember to install Flow globally on your system if you haven't already, and make sure to use the `// @flow` pragma in files you wish to enable type checking for.
-
- May this example empower you to embrace the magic of Flow and wield the power of static typing in your React adventures! Happy coding!
-
-## Conclusion:
-Congratulations, dear apprentice! You have mastered the art of integrating Flow into your Create React App and harnessing its magic to strengthen your codebase. With Flow as your companion, you can fearlessly journey through the lands of React, confident in the knowledge that your types are checked and your code is resilient.
-
-Remember, the path of a Code Mastermind is one of continuous learning and growth. Embrace the power of type checking and let Flow be your guiding light as you unlock new realms of coding excellence!
-
-May your code be elegant, your types be sound, and your journey be filled with joy. Happy coding, and may the magic of Flow be with you always!
\ No newline at end of file
diff --git a/docs/react/building-your-app/adding-relay.md b/docs/react/building-your-app/adding-relay.md
deleted file mode 100644
index ff284877e..000000000
--- a/docs/react/building-your-app/adding-relay.md
+++ /dev/null
@@ -1,211 +0,0 @@
----
-id: adding-relay
-title: Adding Relay
-sidebar_position: 7
-tags: [ react, relay, graphql, create react app, data fetching, data management, efficient, performance, batching, coalescing, over-fetching, server, client, network, environment, store, query, fragment, component, routing, react-router-dom, react-router, react-router-config, react-relay, graphql, relay-runtime, relay-environment-provider, relay-environment, relay-query, relay-fragment, relay-component, relay-routing, relay-graphql, relay-optimization, relay-performance, relay-batching, relay-coalescing, relay-over-fetching, relay-server, relay-client, relay-network, relay-environment, relay-store, relay-query, relay-fragment, relay-component, relay-routing, relay-graphql, relay-optimization, relay-performance, relay-batching, relay-coalescing, relay-over-fetching, relay-server, relay-client, relay-network, relay-environment, relay-store, relay-query, relay-fragment, relay-component, relay-routing, relay-graphql, relay-optimization, relay-performance, relay-batching, relay-coalescing, relay-over-fetching, relay-server, relay-client, relay-network, relay-environment, relay-store, relay-query, relay-fragment, relay-component, relay-routing, relay-graphql, relay-optimization, relay-performance, relay-batching, relay-coalescing, relay-over-fetching, relay-server, relay-client, relay-network, relay-environment, relay-store, relay-query, relay-fragment, relay-component, relay-routing, relay-graphql, relay-optimization, relay-performance, relay-batching, relay-coalescing, relay-over-fetching, relay-server, relay-client, relay-network, relay-environment, relay-store, relay-query, relay-fragment, relay-component, relay-routing, relay-graphql, relay-optimization, relay-performance, relay-batching, relay-coalescing, relay-over-fetching, relay-server, relay-client, relay-network, relay-environment, relay-store, relay-query, relay-fragment, relay-component, relay-routing, relay-graphql, relay-optimization, relay-performance, relay-batching, relay-coalescing, relay-over-fetching, relay-server, relay-client, relay-network, relay-environment, relay-store, relay-query, relay-fragment, relay-component, relay-routing, relay-graphql, relay-optimization, relay-performance, relay-batching, relay-coalescing, relay-over-fetching]
-description: Learn how to integrate Relay into your Create React App, enabling efficient data fetching and management from a GraphQL server in your React applications.
----
-
-## Introduction to Relay
-
-Relay is a powerful GraphQL client framework developed by Facebook. It allows you to efficiently fetch and manage data from a GraphQL server in your React applications. Relay optimizes data fetching by batching and coalescing requests, reducing over-fetching and making your app more performant.
-
-## Prerequisites
-
-Before we begin, make sure you have the following installed:
-
-1. Node.js and npm (Node Package Manager) - You can download it from the official website: https://nodejs.org/
-
-2. Create React App - You can create a new React application using Create React App with the following command in your terminal:
-
- ```bash
- npx create-react-app my-relay-app
- cd my-relay-app
- ```
-
-3. Basic knowledge of React and GraphQL will be helpful, but we'll try to explain everything in a beginner-friendly way.
-
-## Adding Relay to Your Create React App
-
-Let's integrate Relay into your Create React App project.
-
-### Step 1: Install Dependencies
-
-Open your terminal, navigate to your project directory, and install the necessary packages:
-
-```bash
-npm install relay react-relay
-```
-
-### Step 2: Setup Relay Environment
-
-Relay requires a network layer to communicate with your GraphQL server. For this example, we'll use the GitHub GraphQL API. Open your `src` folder and create a new file named `relay-environment.js`:
-
-```javascript title="src/relay-environment.js"
-
-import { Environment, Network, RecordSource, Store } from 'relay-runtime';
-
-async function fetchGraphQL(operation, variables) {
- const response = await fetch('https://api.github.com/graphql', {
- method: 'POST',
- headers: {
- Authorization: 'Bearer YOUR_GITHUB_ACCESS_TOKEN', // Replace with your GitHub access token
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- query: operation.text,
- variables,
- }),
- });
- return await response.json();
-}
-
-const environment = new Environment({
- network: Network.create(fetchGraphQL),
- store: new Store(new RecordSource()),
-});
-export default environment;
-```
-
-Replace `YOUR_GITHUB_ACCESS_TOKEN` with a valid GitHub Personal Access Token. You can create one by following the steps in this guide: https://docs.github.com/en/authentication/creating-a-personal-access-token.
-
-### Step 3: Update index.js
-
-Now, let's make sure our app uses the Relay environment. Open `src/index.js` and update it as follows:
-
-```javascript title="src/index.js"
-
-import React from 'react';
-import ReactDOM from 'react-dom';
-import { RelayEnvironmentProvider } from 'react-relay';
-import environment from './relay-environment';
-import App from './App';
-
-ReactDOM.render(
-
-
- ,
- document.getElementById('root')
-);
-```
-
-### Step 4: Writing Your First Relay Query
-
-In this example, we'll fetch a user's details from the GitHub API using Relay. Create a new file named `User.js` inside the `src` folder:
-
-```javascript title"src/User.js"
-
-import React from 'react';
-import { graphql, useFragment } from 'react-relay';
-
-const userFragment = graphql`
- fragment User_user on User {
- name
- login
- avatarUrl
- }
-`;
-
-function User(props) {
- const user = useFragment(userFragment, props.user);
- return (
-
-
-
{user.name}
-
{user.login}
-
- );
-}
-
-export default User;
-```
-
-### Step 5: Create a Relay Query Component
-
-Now, let's create a component that uses the `User` component and fetches the data using Relay. Create a new file named `Profile.js` inside the `src` folder:
-
-```javascript title="src/Profile.js"
-
-import React from 'react';
-import { graphql, useLazyLoadQuery } from 'react-relay';
-
-const profileQuery = graphql`
- query ProfileQuery {
- viewer {
- ...User_user
- }
- }
-`;
-
-function Profile() {
- const data = useLazyLoadQuery(profileQuery, {});
- return ;
-}
-
-export default Profile;
-```
-
-### Step 6: Add Routing (Optional)
-
-To view the user profile, we'll add routing to your app using `react-router-dom`. First, install the package:
-
-```bash
-npm install react-router-dom
-```
-
-Then, update `src/App.js`:
-
-```javascript title="src/App.js"
-
-import React from 'react';
-import { BrowserRouter as Router, Route, Switch, Link } from 'react-router-dom';
-import Profile from './Profile';
-
-function App() {
- return (
-
-
-
-
-
-
-
-
-
-
Welcome to My Relay App
-
-
-
-
- );
-}
-
-export default App;
-```
-
-### Step 7: Start Your App
-
-Now, you're all set! Save your changes and start your app:
-
-```bash
-npm start
-```
-
-Visit `http://localhost:3000/profile` to see your Relay-powered user profile page!
-
-## Conclusion
-
-Congratulations! You've successfully integrated Relay into your Create React App and fetched data from the GitHub API. This is just the beginning of what Relay can do for your React applications. Continue exploring Relay's documentation and its powerful features to take your app to the next level.
-
-:::tip Info
-Remember to replace the GitHub API with your own GraphQL API to experiment further with Relay. Happy coding!
-:::
\ No newline at end of file
diff --git a/docs/react/building-your-app/adding-typescript.md b/docs/react/building-your-app/adding-typescript.md
deleted file mode 100644
index 87a892e4d..000000000
--- a/docs/react/building-your-app/adding-typescript.md
+++ /dev/null
@@ -1,72 +0,0 @@
----
-id: adding-typescript
-title: Adding TypeScript
-sidebar_position: 6
-tags: [react, adding-typescript, typescript]
-description: "Learn how to add TypeScript to your Create React App project. Enhance your code with type safety and unleash the power of TypeScript in your React applications."
----
-
-:::note
-> **Attention, aspiring wizards of code!**
-> Welcome to a magical journey where we shall unleash the power of TypeScript upon our Create React App. Fear not, for this enchanting endeavor shall aid you in writing more robust and delightful spells in the realm of React!
-:::
-
-## Introduction:
-
-Welcome, brave Code Apprentices, to the realm of TypeScript—a powerful sorcery that brings type safety and enchanting possibilities to your JavaScript spells. In this guide, we shall embark on an epic quest to integrate TypeScript into your Create React App, paving the way for a magical journey of robust and error-free coding!
-
-### 1: Embrace the TypeScript Magic
-
-TypeScript, a captivating typed superset of JavaScript, compiles to pure JavaScript, bringing clarity and precision to your code incantations. But fear not, for its integration is swift and graceful. To commence your journey, ensure your `react-scripts` version is 2.1.0 or higher, and invoke the sacred command:
-
-```sh
-npx create-react-app my-app --template typescript
-```
-
-Or, if you are a follower of the yarn tradition:
-
-```sh
-yarn create react-app my-app --template typescript
-```
-
-Fear not, for a seamless TypeScript setup awaits you!
-
-### 2: Enchanting Existing Projects
-
-For seasoned adventurers with existing Create React App projects, the path to TypeScript enlightenment is equally accessible. Embark on this path by installing the following mystical packages:
-
-```sh
-npm install --save typescript @types/node @types/react @types/react-dom @types/jest
-```
-
-Or let yarn's magic weave its wonders:
-
-```sh
-yarn add typescript @types/node @types/react @types/react-dom @types/jest
-```
-
-But be mindful, to unlock the true essence of TypeScript, bestow upon your files the illustrious `.tsx` extension (e.g., `src/index.js` to `src/index.tsx`). And lo, as you cast your eyes upon your code, a [`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) shall emerge, guiding your TypeScript endeavors.
-
-Finally, to invoke the full powers of TypeScript, perform the sacred rite: **restart your development server!** Your creation shall now be shielded by the embrace of type safety.
-
-Behold, as the veil of type errors reveals itself in the console! Fear not, for by resolving these, you shall wield the mighty powers of TypeScript and take your React project to new heights. For the intrepid explorers, [advanced configuration](../advanced-usage/advanced-configuration.md) awaits!
-
-### 3: Venturing into TypeScript and React
-
-Dear adventurers, rejoice, for the journey has only begun! As you dive deeper into the depths of TypeScript, treasure troves of knowledge await:
-
-- [The TypeScript Handbook](https://www.typescriptlang.org/): An exquisite tome that unveils the secrets of TypeScript's arcane syntax and features.
-- [TypeScript Example on React](https://www.typescriptlang.org/play/index.html?jsx=2&esModuleInterop=true&e=196#example/typescript-with-react): A magical sandbox where you can experiment with TypeScript in the realm of React.
-- [React + TypeScript Cheatsheets](https://github.com/typescript-cheatsheets/react-typescript-cheatsheet#reacttypescript-cheatsheets): A sacred manuscript offering invaluable insights into the fusion of React and TypeScript.
-
-### 4: Overcoming Challenges and Sorcery
-
-In every adventurer's journey, challenges arise, and even TypeScript is not immune. Should you encounter the absence of TypeScript in your creation, heed this advice: cast away the lingering shadows of cached versions by uninstalling `create-react-app` globally. Allow `npx` to guide you to the latest version, ever fresh and powerful!
-
-As you grow in wisdom, be mindful of the limitations of TypeScript and Babel. Constant enums and namespaces may elude you in this union, but fret not! [Understanding the constraints](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats) shall aid your path to enlightenment.
-
-## Conclusion:
-
-Congratulations, esteemed Code Apprentices! You have harnessed the power of TypeScript within your React projects, ushering in an era of type safety and spellbinding possibilities. Let your code flourish in the embrace of TypeScript, safeguarded from the clutches of runtime errors!
-
-Remember, the journey of a Code Apprentice is never-ending, filled with knowledge and growth. Embrace TypeScript's magic and let your code inspire and dazzle fellow adventurers. May your journey be filled with wonder and enchantment!
\ No newline at end of file
diff --git a/docs/react/building-your-app/importing-a-component.md b/docs/react/building-your-app/importing-a-component.md
deleted file mode 100644
index efcd77ada..000000000
--- a/docs/react/building-your-app/importing-a-component.md
+++ /dev/null
@@ -1,96 +0,0 @@
----
-id: importing-a-component
-title: Importing Components in React
-sidebar_label: Importing a Component
-sidebar_position: 2
-tags: [react, import, component, importation, import, export, module, file, path, relative, absolute, jsx, javascript, code, code-splitting, dynamic, lazy, suspense, react.lazy, react.suspense, dynamic-import, import, export, module, file, path, relative, absolute, jsx, javascript, code, code-splitting, dynamic, lazy, suspense, react.lazy, react.suspense, dynamic-import]
-description: "Learn how to import components in your React applications. Unleash the magic of component importation and integrate them into your app with ease!"
----
-
-Welcome, brave Code Masterminds, to the wondrous world of component importation! In this guide, we shall unravel the secrets of importing components in your React applications, enabling you to summon their powers and weave them into the fabric of your app.
-
-## The Art of Component Summoning
-
-When crafting your React masterpiece, you'll often encounter the need to import components from external sources. Fear not, for we shall equip you with the mystical knowledge to achieve this feat!
-
-To import a component, follow these steps:
-
-**Step 1:** Prepare your spellbook (a.k.a. your code editor) and open the file where you wish to import the component.
-
-**Step 2:** Utter the sacred incantation, starting with the `import` keyword. Specify the name of the component you wish to summon, and assign it to a variable of your choosing.
-
-```jsx
-import { ComponentName } from './path/to/component';
-```
-
-Here, `ComponentName` represents the name you desire for your component variable, and `'./path/to/component'` refers to the relative path of the component file from the current file. Feel free to customize these as per your needs!
-
-**Step 3:** With the component summoned, you are now ready to employ its powers within your code. Invoke it as a JSX tag, just like any other HTML element, and witness the magic unfold!
-
-```jsx title="MyMagicalApp.jsx"
-import { ComponentName } from './path/to/component';
-
-function MyMagicalApp() {
- return (
-
-
Welcome to My Magical App!
-
-
- );
-}
-```
-
-Voilà! You have successfully summoned and integrated the component into your app. The magic of React is now at your fingertips!
-
-## A Live Example to Unleash the Magic
-
-To solidify your understanding, let us embark on a mystical journey with a live example. Imagine you possess a component called `Wizard`, capable of conjuring spells and enchantments. We shall import this component and unleash its powers within our app.
-
-**Step 1:** Create a new file called `Wizard.jsx` and add the following code:
-
-```jsx title="Wizard.jsx"
-import React from 'react';
-
-function Wizard() {
- return
I am a Wizard! Prepare to be amazed!
;
-}
-
-export default Wizard;
-```
-
-**Step 2:** Open your main app file (e.g., `App.js`) and import the `Wizard` component:
-
-```jsx title="App.js"
-import React from 'react';
-import Wizard from './Wizard';
-
-function App() {
- return (
-
-
Welcome to My Magical App!
-
-
- );
-}
-
-export default App;
-```
-
-Behold the power of importation! The `Wizard` component shall grace your app, displaying the majestic message "I am a Wizard! Prepare to be amazed!"
-
-
-
-
-
Welcome to My Magical App!
-
I am a Wizard! Prepare to be amazed!
-
-
-
-
-## Conclusion
-
-Congratulations, dear apprentice! You have mastered the art of importing components in your React app. With this newfound knowledge, you can now summon and integrate a myriad of components to bring your app to life.
-
-Remember, the path of a Code Mastermind is filled with curiosity and exploration. Experiment with different components, combine their powers, and create awe-inspiring React applications that mesmerize the world!
-
-May your code be elegant, your components harmonious, and your journey through React be filled with laughter and enchantment.
\ No newline at end of file
diff --git a/docs/react/building-your-app/installing-a-dependency.md b/docs/react/building-your-app/installing-a-dependency.md
deleted file mode 100644
index c2c1a3d21..000000000
--- a/docs/react/building-your-app/installing-a-dependency.md
+++ /dev/null
@@ -1,106 +0,0 @@
----
-id: installing-a-dependency
-title: Installing a Dependency
-sidebar_label: Dependency
-sidebar_position: 1
-tags: [react, create react app, npm, dependencies, package, install, installation, node package manager, react-scripts, react-dom, react-icons, react-scripts, react-app, react-app-template]
-description: Learn how to install a dependency in your Create React App project. Unleash the power of enchanting packages and add new spells to your React app with the help of npm.
----
-
-:::note
-Welcome, brave apprentice! Let's embark on a magical quest of installing dependencies in your enchanted Create React App. Fear not, for we shall guide you through the mystical process step-by-step.
-:::
-
-## 🧙♂️ The Art of Dependency Sorcery
-
-In the realm of React, dependencies are powerful allies that bestow extraordinary abilities upon your app. These magical spells come in the form of packages, designed and crafted by the brilliant wizards of the open-source community.
-
-## 📦 Unveiling the Magic of `npm`
-
-To summon these powerful allies, we shall wield the mighty `npm`, also known as Node Package Manager. `npm` is the gateway to a vast library of enchanting packages. With a single incantation, it can fetch and install any spell your heart desires.
-
-## 🔮 The Chant of Installation
-
-Let's dive into the process of installing a dependency. Open your command-line spellbook, and within the enchanted directory of your Create React App, invoke the sacred incantation:
-
-```bash
-npm install
-```
-
-Replace `` with the name of the magical package you wish to add. For instance, if you seek the powers of a styling spell called `awesome-styler`, the chant shall be:
-
-```bash
-npm install awesome-styler
-```
-
-## 🌟 Casting the Spell - A Live Example
-
-Behold! As a testament to our guidance, we shall demonstrate the mystical art of installing a dependency with a live example.
-
-### Step 1: Create Your Enchanted React App
-
-First, create a new Create React App. In your command-line spellbook, execute:
-
-```bash
-npx create-react-app magical-app
-cd magical-app
-```
-
-### Step 2: Unleash the Spell
-
-Now, it is time to summon a magical package! Let's bring forth the mystical `react-icons`, a library full of captivating icons for your app.
-
-```bash
-npm install react-icons
-```
-
-### Step 3: Wield the Magic
-
-Open the spellbook of your React app, and behold the wonders of `react-icons`. Cast the spell by adding this code to your enchanted `App.js`:
-
-```jsx
-import React from 'react';
-import { FaReact } from 'react-icons/fa';
-
-const App = () => {
- return (
-
-
Welcome to Your Magical App!
-
Behold the sacred symbol of React:
-
-
- );
-};
-
-export default App;
-```
-
-### Step 4: Enchant the World
-
-With your spell complete, return to your command-line spellbook, and recite the following:
-
-```bash
-npm start
-```
-
-
-
-
-
Welcome to Your Magical App!
-
Behold the sacred symbol of React:
-
-
-
-
-
-Witness the magic come to life as your app springs forth with the enchanting `FaReact` icon, symbolizing the power of React!
-
-## 🎉 Celebration and Further Exploration
-
-Congratulations, brave apprentice! You have delved into the secrets of installing dependencies and wielded the magic of `react-icons`. But fear not, for this is just the beginning of your journey.
-
-Explore the vast magical repository of `npm`, and discover new spells to enhance your creations. Unravel the mysteries of more complex dependencies and conquer the challenges that lie ahead.
-
-Remember, the quest of a developer is a never-ending adventure, filled with wonder, excitement, and endless possibilities.
-
-May your code be bug-free, and your creativity know no bounds. Onwards to new magical horizons!
\ No newline at end of file
diff --git a/docs/react/building-your-app/making-a-progressive-web-app.md b/docs/react/building-your-app/making-a-progressive-web-app.md
deleted file mode 100644
index e96209632..000000000
--- a/docs/react/building-your-app/making-a-progressive-web-app.md
+++ /dev/null
@@ -1,120 +0,0 @@
----
-id: making-a-progressive-web-app
-title: Making a Progressive Web App with Create React App
-sidebar_label: Making a Progressive Web App
-sidebar_position: 10
-tags: []
-keywords: [ create react app, react, react-scripts, node, node.js, npm, start, build, test, production, development, local, pwa, progressive web app, service worker, caching, offline, access, fast, loading, engaging, experience, responsive, design, web, mobile, app, native, user, experience, user, retention, web, technologies, html, css, javascript, responsive, devices, desktop, smartphone, tablet, reliable, fast, engaging, offline, access, responsive, design, service, workers, caching, strategies, user, experience, user, retention, web, technologies, html, css, javascript, responsive, devices, desktop, smartphone, tablet, reliable, fast, engaging, offline, access, responsive, design, service, workers, caching, strategies, user, experience, user, retention, web, technologies, html, css, javascript, responsive, devices, desktop, smartphone, tablet, reliable, fast, engaging, offline, access, responsive, design, service, workers, caching, strategies, user, experience, user, retention, web, technologies, html, css, javascript, responsive, devices, desktop, smartphone, tablet, reliable, fast, engaging, offline, access, responsive, design, service, workers, caching, strategies, user, experience, user, retention, web, technologies, html, css, javascript, responsive, devices, desktop, smartphone, tablet, reliable, fast, engaging, offline, access, responsive, design, service, workers, caching, strategies, user, experience, user, retention, web, technologies, html, css, javascript, responsive, devices, desktop, smartphone, tablet, reliable, fast, engaging, offline, access, responsive, design, service, workers, caching, strategies, user, experience, user, retention, web, technologies, html, css, javascript, responsive, devices, desktop, smartphone, tablet, reliable, fast, engaging, offline, access, responsive, design, service, workers, caching, strategies, user, experience, user, retention, web, technologies, html, css, javascript]
-description: Learn how to turn your regular React application into a fully-fledged Progressive Web App (PWA) using Create React App.
----
-
-Welcome to the exciting world of Progressive Web Apps (PWAs)! In this guide, we'll explore how to turn your regular React application into a fully-fledged PWA using Create React App.
-
-## What is a Progressive Web App (PWA)?
-
-Progressive Web Apps (PWAs) are modern web applications that provide a native app-like experience to users, combining the best of web and mobile apps. They are reliable, fast, and engaging, and they work offline too!
-
-PWAs are built using web technologies like HTML, CSS, and JavaScript and are designed to be responsive across different devices, including desktops, smartphones, and tablets. They are a great way to enhance user experience and boost user retention.
-
-A Progressive Web App is a web application that takes advantage of modern web technologies to deliver an enhanced user experience. PWAs are designed to be fast, reliable, and engaging, providing a native-app-like feel to users while being accessible directly from their web browsers.
-
-## Why build a PWA?
-
-PWAs offer several benefits:
-
-1. **Offline Access:** PWAs can work offline or in low-network conditions, allowing your users to access your app anytime, anywhere.
-
-2. **Fast Loading:** With service workers and caching strategies, PWAs load quickly, reducing bounce rates and keeping users engaged.
-
-3. **Engaging Experience:** PWAs can be installed on users' devices, providing a more immersive experience without the need to visit an app store.
-
-4. **Responsive Design:** PWAs adapt to different screen sizes and devices, ensuring a seamless experience across all platforms.
-
-## Prerequisites
-
-Before we begin, make sure you have the following:
-
-- Node.js and npm installed on your machine.
-- Basic knowledge of React.js and Create React App.
-
-## Let's Get Started!
-
-### Step 1: Create a new Create React App project
-
-If you haven't already, let's create a new React project using Create React App:
-
-```bash
-npx create-react-app my-pwa-app
-cd my-pwa-app
-```
-
-### Step 2: Install the Workbox Library
-
-Workbox is a powerful library that simplifies service worker creation and caching strategies. To install Workbox, run the following command in your project directory:
-
-```bash
-npm install workbox-webpack-plugin --save-dev
-```
-
-### Step 3: Update the Service Worker
-
-Now, let's create a service worker file and configure it to cache our app's assets for offline access. Create a new file called `service-worker.js` in the `public` folder and add the following code:
-
-```javascript title="public/service-worker.js"
-
-import { precacheAndRoute } from 'workbox-precaching';
-
-// Precache all the assets generated by webpack
-precacheAndRoute(self.__WB_MANIFEST);
-```
-
-### Step 4: Configure the Webpack to Use the Service Worker
-
-Next, we need to configure Create React App to use our service worker during the build process. Open the `webpack.config.js` file located in the `config` folder and make the following changes:
-
-```javascript title="config/webpack.config.js"
-
-const { InjectManifest } = require('workbox-webpack-plugin');
-
-module.exports = function override(config, env) {
- if (env === 'production') {
- // Add the Workbox plugin to generate the service worker
- config.plugins.push(new InjectManifest({
- swSrc: './public/service-worker.js',
- // Add any additional configuration options here
- }));
- }
- return config;
-};
-```
-
-### Step 5: Build your PWA
-
-With the configuration in place, it's time to build your PWA:
-
-```bash
-npm run build
-```
-
-### Step 6: Test your PWA Locally
-
-You can now test your PWA locally by serving the production build:
-
-```bash
-npm install -g serve
-serve -s build
-```
-
-Visit `http://localhost:5000` in your web browser to see your awesome PWA in action!
-
-### Step 7: Deploy your PWA
-
-To share your PWA with the world, deploy it on a hosting platform like Vercel, Netlify, or GitHub Pages.
-
-Congratulations! You've just transformed your React app into a Progressive Web App. Users will now enjoy a faster, more engaging experience with offline access. Enjoy the power of PWAs!
-
-## Conclusion
-
-In this guide, we've explored the process of creating a Progressive Web App using Create React App. By implementing service workers and caching strategies, your app is now capable of running offline and delivering a fantastic user experience.
-
-Remember, PWAs are a constantly evolving field, so keep exploring new possibilities and enhancing your app to provide the best user experience possible. Happy coding!
diff --git a/docs/react/building-your-app/measuring-performance.md b/docs/react/building-your-app/measuring-performance.md
deleted file mode 100644
index 22c7001d8..000000000
--- a/docs/react/building-your-app/measuring-performance.md
+++ /dev/null
@@ -1,138 +0,0 @@
----
-id: measuring-performance
-title: Measuring Performance in React with Create React App
-sidebar_label: Measuring Performance
-sidebar_position: 11
-tags: [react, performance, web vitals, lighthouse, react devtools, performance.measure, react profiler, performance, web vitals, lighthouse, react devtools, performance.measure, react profiler, performance, web vitals, lighthouse, react devtools, performance.measure, react profiler, performance, web vitals, lighthouse, react devtools, performance.measure, react profiler]
-description: Learn how to measure and optimize the performance of your React app using Create React App. Unleash the power of Web Vitals, Lighthouse, and React DevTools to create a blazing-fast user experience!
----
-
-Create React App comes with a built-in feature to help you measure and analyze your app's performance. It uses something called "Web Vitals," which are helpful metrics that capture how users experience your web page. Let's see how we can use this powerful tool to optimize your app!
-
-## Measuring Performance in Your React App
-
-Create React App comes with a built-in feature to help you measure and analyze your app's performance. It uses something called "Web Vitals," which are helpful metrics that capture how users experience your web page. Let's see how we can use this powerful tool to optimize your app!
-
-## What are Web Vitals?
-
-Web Vitals are metrics that tell us about the user experience of a web page. They help us understand how fast the page loads, how quickly it responds to user actions, and more. This way, we can make our app snappier and delightful for users.
-
-## Introduction
-
-When building a React app, it's essential to ensure that it performs optimally to provide a smooth and responsive user experience. Measuring the performance of your React application can help you identify potential bottlenecks and optimize its speed and efficiency. In this guide, we'll explore some practical techniques for measuring performance using Create React App (CRA), a popular tool for bootstrapping React projects.
-
-## 1. Why Measure Performance?
-
-Imagine you have created a fantastic React app with stunning visuals and innovative features, but it feels sluggish and unresponsive. Users may get frustrated and abandon your app, leading to a loss in engagement and potential customers. Measuring performance helps you:
-
-- **Identify Performance Issues:** By analyzing metrics, you can pinpoint areas where your app might be slow or inefficient.
-
-- **Optimize User Experience:** Improving performance leads to faster load times, smoother interactions, and happier users.
-
-- **Boost Conversion Rates:** A performant app encourages users to stick around and engage more, which can lead to higher conversion rates.
-
-Now, let's dive into how you can measure the performance of your React app effectively.
-
-## 2. Performance Metrics to Track
-
-Before we start measuring, let's understand the essential performance metrics:
-
-- **First Contentful Paint (FCP):** This metric measures the time from navigation to when the first content appears on the screen. A lower FCP indicates a faster-loading app.
-
-- **Time to Interactive (TTI):** TTI measures how long it takes for the app to become fully interactive. Users can click buttons or interact with elements after this point.
-
-- **Total Blocking Time (TBT):** TBT calculates the total duration when the app is unresponsive to user input due to long tasks running on the main thread.
-
-- **Memory Usage:** Monitoring memory consumption helps you identify memory leaks and improve resource management.
-
-## 3. Using Lighthouse for Performance Auditing
-
-Create React App comes with excellent tools for performance auditing, and one such tool is Google Lighthouse. Lighthouse is an open-source tool that can help you assess various aspects of your app's performance, accessibility, and more.
-
-To use Lighthouse, follow these steps:
-
-1. Open your app in Google Chrome.
-2. Press `F12` or right-click and select "Inspect" to open DevTools.
-3. Click on the "Lighthouse" tab.
-4. Choose the desired categories (Performance, Accessibility, etc.).
-5. Click "Generate Report."
-
-Lighthouse will analyze your app and provide a detailed report with suggestions to improve performance.
-
-## 4. Analyzing Performance with React DevTools
-
-React DevTools is another powerful tool for measuring performance and debugging React applications. It's available as a browser extension and allows you to inspect React component hierarchies, state changes, and performance profiles.
-
-To get started with React DevTools:
-
-1. Install the extension in your preferred browser.
-2. Open your app and launch DevTools (`F12` or right-click and select "Inspect").
-3. Look for the "React" or "Components" tab in the DevTools panel.
-
-You can use React DevTools to check component rendering times, identify unnecessary re-renders, and optimize your app's performance.
-
-## 5. Manual Performance Profiling
-
-For more advanced performance analysis, you can manually profile your app using the following approaches:
-
-- **Performance.measure():** This API allows you to measure custom metrics and performance between specific points in your code.
-
-- **React Profiler:** This built-in component provides detailed information about rendering time, re-renders, and component hierarchies.
-
-## Getting Started
-
-To start measuring Web Vitals, all you need to do is use the `reportWebVitals` function in your `index.js` file. It's as simple as passing a function to it, like this:
-
-```js
-reportWebVitals(console.log);
-```
-
-This function will give you the final values of various metrics after they finish calculating on the page. You can log these results to the console or even send them to an analytics endpoint.
-
-## Sending Results to Analytics
-
-By sending Web Vitals data to analytics, you can track how your app performs in the real world for actual users. Here's an example of how to send the results to an analytics endpoint:
-
-```js
-function sendToAnalytics(metric) {
- const body = JSON.stringify(metric);
- const url = 'https://example.com/analytics';
-
- // Use `navigator.sendBeacon()` if available, falling back to `fetch()`
- if (navigator.sendBeacon) {
- navigator.sendBeacon(url, body);
- } else {
- fetch(url, { body, method: 'POST', keepalive: true });
- }
-}
-
-reportWebVitals(sendToAnalytics);
-```
-
-:::note Note for Google Analytics Users
-If you use Google Analytics, you can send the results to it using the `id` value. This helps you easily analyze and calculate important metrics.
-:::
-
-```js
-function sendToAnalytics({ id, name, value }) {
- ga('send', 'event', {
- eventCategory: 'Web Vitals',
- eventAction: name,
- eventValue: Math.round(name === 'CLS' ? value * 1000 : value), // values must be integers
- eventLabel: id, // id unique to the current page load
- nonInteraction: true, // avoids affecting bounce rate
- });
-}
-
-reportWebVitals(sendToAnalytics);
-```
-
-That's it! With these simple steps, you can now measure your app's performance and make it faster and more enjoyable for your users.
-
-## Conclusion
-
-Measuring performance is a critical step in the development process. By using tools like Lighthouse and React DevTools, along with manual profiling techniques, you can identify performance bottlenecks and optimize your React app for a better user experience.
-
-Remember, a faster app not only delights your users but also improves your chances of success in the competitive world of web development!
-
-Now go ahead, measure your app's performance, and unleash the true potential of your React project!
\ No newline at end of file
diff --git a/docs/react/building-your-app/production-build.md b/docs/react/building-your-app/production-build.md
deleted file mode 100644
index 03d548ab5..000000000
--- a/docs/react/building-your-app/production-build.md
+++ /dev/null
@@ -1,127 +0,0 @@
----
-id: production-build
-title: Creating a Production Build in Create React App
-sidebar_label: Production Build
-sidebar_position: 12
-tags: [react, create react app, production build, react build, production build, create react app production build, react production build, create react app build, react build, production build, create react app production build, react production build, create react app build, react build, production build, create react app production build, react production build, create react app build, react build, production build, create react app production build, react production build, create react app build, react build, production build, create react app production build, react production build, create react app build, react build, production build ]
-keywords: ["create react app production build", "react production build", "create react app build", "react build", "production build", "create react app production build", "react production build", "create react app build", "react build", "production build", "create react app production build", "react production build", "create react app build", "react build", "production build", "create react app production build", "react production build", "create react app build", "react build", "production build" ]
-description: Learn how to create a production build for your React app using Create React App. Optimize your code, reduce file sizes, and enhance performance for your users with this enchanting guide!
----
-
-Welcome, aspiring developers, to the magical world of React production builds! In this enchanting guide, we'll walk you through the process of creating a production build for your Create React App. Brace yourselves for optimized code, faster load times, and an immersive user experience!
-
-## Understanding Production Builds
-
-Before we set sail on our quest, let's unravel the mystery of production builds. During development, we often use a special mode that helps with debugging and hot-reloading. But when it's time to release our app into the wild, we want it to be nimble and performant. Enter the production build!
-
-A production build is the polished and optimized version of your React app. It reduces file sizes, implements caching techniques, and enhances performance for your end-users. Imagine your app transforming from a budding sapling to a majestic oak tree—ready to stand tall in the digital forest!
-
-### 📁 Static File Caching 🚀
-
-When you create a production build in Create React App, a fascinating magic happens! Each file inside the `build/static` directory receives a unique hash 🧙♂️. It's like a secret spell that's generated based on the file's contents 📝. This enchanting hash allows us to use aggressive caching techniques ✨. Imagine it as a magical seal that prevents the browser from re-downloading your assets if nothing has changed 🚫🔄.
-
-For instance, let's say your React app has a magical image ✨🌟 that rarely changes, like your logo. During the first build, the image gets a unique hash in its filename, like `logo.abc123.png` 🎇. When you deploy your app, the browser happily caches this logo with its magical seal for a year 🗓️.
-
-Now, imagine you decide to update the image slightly. No worries! During the subsequent build, the contents of the image change, and voilà, a new unique hash is born 🎉. The updated image now has a filename like `logo.xyz456.png`. Since the filename hash has changed, the browser knows it's time to download the new version with excitement 🎊.
-
-To deliver the ultimate performance to your users, you can use the Cache-Control header 📜. Think of it as a scroll of command that controls the caching duration. For example, you can set `Cache-Control: max-age=31536000` for your `build/static` assets, like your JavaScript and CSS files. This delightful spell ensures that your user's browser will cache these files for a whole year 🗓️.
-
-Now, imagine you have a spellbinding HTML file, your `index.html`, which might change more often than the static assets. In this case, you can set `Cache-Control: no-cache` for your `index.html`. This clever trick ensures the browser will always check for an updated version of your HTML spellbook whenever your app is revisited 📖.
-
-To sum it all up, using these caching spells wisely ensures your users will experience the magic of your app with lightning-fast loading times and a delightful user experience! 🌟⚡
-
-### 🎭 Profiling: Peek Behind the Curtain!
-
-In the magical land of React, performance profiling is like gazing into a crystal ball, revealing the secrets of your app's performance. 🌟
-
-In development mode (v16.5+), ReactDOM automatically supports profiling without any special incantations. However, in production mode, profiling remains hidden, adding just a touch of extra magic. To unveil its powers, you must opt-in using the `--profile` flag. 🧙♂️
-
-Imagine you're preparing for the grand performance of your app, and you want to ensure it shines like a dazzling star. To enable profiling in the production build, wave your wand (terminal) and chant:
-
-```bash
-npm run build -- --profile
-```
-
-Or if you prefer yarn magic:
-
-```bash
-yarn build --profile
-```
-
-Now, behold the wondrous React DevTools! 🌌 They hold the key to understanding your app's performance like never before. Consult the [React docs](https://reactjs.org/docs/optimizing-performance.html#profiling-components-with-the-devtools-profiler) to master the art of using the DevTools Profiler. It's like learning to control the elements! 🔥💨💧🌪
-
-Just as a talented performer perfects their craft by studying their act, you, too, can dive into your app's performance to discover hidden bottlenecks and optimize its speed and efficiency. 🎉
-
-
-## The Production Build Process
-
-To create a production build in Create React App, you'll need Node.js and npm (Node Package Manager) installed on your computer. If you don't have them already, head to https://nodejs.org and follow the installation instructions.
-
-Now, let's dive into the steps to create a magical production build:
-
-### Step 1: Navigate to Your App Directory
-
-Open your favorite terminal or command prompt and navigate to your React app's root directory. If you're not sure where it is, run the following command to create a new React app:
-
-```bash
-npx create-react-app my-awesome-app
-cd my-awesome-app
-```
-
-Replace `my-awesome-app` with your desired app name.
-
-### Step 2: Cast the Spell of Optimization
-
-With your wand (terminal) in hand, it's time to unleash the power of optimization upon your app. To create the production build, run the following command:
-
-```bash
-npm run build
-```
-
-This command works its magic and conjures a `build` directory containing your production-ready app.
-
-### Step 3: Unveil the Artifacts
-
-Behold, the fruits of your labor are revealed within the `build` directory! Inside the `build/static` folder, you'll find the precious JavaScript and CSS files. Each filename will be appended with a unique hash, like a secret spell, to enable [long term caching techniques](#-static-file-caching-).
-
-Additionally, you'll encounter several `.js` files, also known as _chunks_, within the `build/static/js` directory:
-
-- `main.[hash].chunk.js`: This houses your application code, including your beloved `App.js`.
-
-- `[number].[hash].chunk.js`: These files contain either _vendor_ code or [code splitting chunks](../styles-and-assets/code-splitting.md). _Vendor_ code includes modules imported from `node_modules`. Separating _vendor_ and _application_ code allows for better caching and improved loading performance.
-
-- `runtime-main.[hash].js`: This small chunk of [webpack runtime](https://webpack.js.org/configuration/optimization/#optimization-runtimechunk) logic is used to load and run your application. By default, it's embedded in your `build/index.html` file to save a network request.
-
-### Step 4: Embrace Static File Caching
-
-In the realm of production builds, caching is a powerful ally for performance. Each file inside `build/static` has a unique hash based on its contents. This enables [aggressive caching techniques](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching#invalidating_and_updating_cached_responses), preventing unnecessary re-downloads when file contents haven't changed.
-
-To optimize caching, specify a `Cache-Control` header for both `index.html` and the files within `build/static`. This header controls the caching duration for the browser and Content Delivery Networks (CDNs). Here's an example of setting `Cache-Control` headers:
-
-```html
-
-
-
-
-
- Header set Cache-Control "max-age=31536000"
-
-```
-
-With these caching spells in place, your app's static assets will be cached for a year, and your users will enjoy a delightful experience.
-
-### Step 5: Profiling Your App (Optional)
-
-For those who wish to dive deeper into the magical arts of performance optimization, React offers profiling in development mode (v16.5+). In production mode, profiling is opt-in, providing insights into your app's performance. To enable profiling, add the `--profile` flag when running the build command:
-
-```bash
-npm run build -- --profile
-```
-
-With profiling activated, you can leverage the React DevTools to delve into the mysteries of your app's performance. For more details, visit the [React Docs](https://reactjs.org/docs/optimizing-performance.html#profiling-components-with-the-devtools-profiler).
-
-## Conclusion
-
-Congratulations, young wizards! You've successfully mastered the art of creating a production build for your React app. Now, your code is optimized, your performance is enchanting, and your users will be spellbound by the experience. As you embark on your coding adventures, remember to cast the spells of optimization and caching to create truly magical web applications!
-
-May your code be bug-free, your designs be captivating, and your journey be filled with awe-inspiring creations. Happy coding!
diff --git a/docs/react/building-your-app/style.css b/docs/react/building-your-app/style.css
deleted file mode 100644
index ee43220e3..000000000
--- a/docs/react/building-your-app/style.css
+++ /dev/null
@@ -1,136 +0,0 @@
-.btn {
- display: inline-block;
- font-weight: 400;
- text-align: center;
- white-space: nowrap;
- vertical-align: middle;
- user-select: none;
- border: 1px solid transparent;
- padding: 0.375rem 0.75rem;
- font-size: 1rem;
- line-height: 1.5;
- border-radius: 0.25rem;
- transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
- border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-}
-
-.btn-primary {
- color: #fff;
- background-color: #007bff;
- border-color: #007bff;
-}
-
-.btn-primary:hover {
- background-color: #0056b3;
- border-color: #0056b3;
-}
-
-.btn-primary:focus {
- box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
-}
-
-.btn-success {
- color: #fff;
- background-color: #28a745;
- border-color: #28a745;
-}
-
-.btn-success:hover {
- background-color: #218838;
- border-color: #1e7e34;
-}
-
-.btn-success:focus {
- box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);
-}
-
-.btn-danger {
- color: #fff;
- background-color: #dc3545;
- border-color: #dc3545;
-}
-
-.btn-danger:hover {
- background-color: #c82333;
- border-color: #bd2130;
-}
-
-.btn-danger:focus {
- box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);
-}
-
-.btn-warning {
- color: #212529;
- background-color: #ffc107;
- border-color: #ffc107;
-}
-
-.btn-warning:hover {
- background-color: #e0a800;
- border-color: #d39e00;
-}
-
-.btn-warning:focus {
- box-shadow: 0 0 0 0.2rem rgba(255, 213, 106, 0.5);
-}
-
-.btn-secondary {
- color: #fff;
- background-color: #6c757d;
- border-color: #6c757d;
-}
-
-.btn-secondary:hover {
- background-color: #6c757e;
- border-color: #dae0e5;
-}
-
-.btn-secondary:focus {
- box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5);
-}
-
-.form-control {
- font-size: 16px;
- padding: 10px;
- border: 1px solid #ccc;
- border-radius: 4px;
- box-shadow: none;
- outline: none;
- transition: border-color 0.2s ease-in-out;
-}
-
-.form-control:focus {
- border-color: #80bdff;
- box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
-}
-
-.row {
- display: flex;
- flex-wrap: wrap;
- margin: 0 -15px;
-}
-@media screen and (max-width: 365px) {
- .row {
- display: block;
- }
-}
-.col-sm-6 {
- flex: 0 0 50%;
- max-width: 50%;
- padding: 15px;
- box-sizing: border-box;
- font-size: 18px;
-}
-
-.mt-4 {
- margin-top: 16px;
-}
-
-.mt-5 {
- margin-top: 3rem !important;
-}
-
-.lead {
- font-size: 16px;
- line-height: 1.5;
-}
diff --git a/docs/react/building-your-app/using-global-variables.md b/docs/react/building-your-app/using-global-variables.md
deleted file mode 100644
index 9a73e839e..000000000
--- a/docs/react/building-your-app/using-global-variables.md
+++ /dev/null
@@ -1,225 +0,0 @@
----
-id: using-global-variables
-title: Using Global Variables
-sidebar_position: 3
-tags: [react, global, variables, global-variables, global-variables-in-react, global-variables-in-javascript, global-variables-in-react-app, global-variables-in-react-component, global-variables-in-react-application, global-variables-in-react-js, global-variables-in-react-jsx, global-variables-in-react-javascript, global-variables-in-react-jsx-javascript, global-variables-in-react-jsx-component, global-variables-in-react-jsx-application, global-variables-in-react-jsx-app, global-variables-in-react-jsx-applications, global-variables-in-react-jsx-components, global-variables-in-react-jsx-javascripts, global-variables-in-react-jsx-javascript, global-variables-in-react-jsx-apps, global-variables-in-react-jsx-applications, global-variables-in-react-jsx-components, global-variables-in-react-jsx-component, global-variables-in-react-jsx-application, global-variables-in-react-jsx-app, global-variables-in-react-jsx-applications, global-variables-in-react-jsx-components, global-variables-in-react-jsx-javascripts, global-variables-in-react-jsx-javascript, global-variables-in-react-jsx-apps, global-variables-in-react-jsx-applications, global-variables-in-react-jsx-components, global-variables-in-react-jsx-component, global-variables-in-react-jsx-application, global-variables-in-react-jsx-app, global-variables-in-react-jsx-applications, global-variables-in-react-jsx-components, global-variables-in-react-jsx-javascripts, global-variables-in-react-jsx-javascript, global-variables-in-react-jsx-apps, global-variables-in-react-jsx-applications, global-variables-in-react-jsx-components, global-variables-in-react-jsx-component, global-variables-in-react-jsx-application, global-variables-in-react-jsx-app, global-variables-in-react-jsx-applications, global-variables-in-react-jsx-components, global-variables-in-react-jsx-javascripts, global-variables-in-react-jsx-javascript, global-variables-in-react-jsx-apps, global-variables-in-react-jsx-applications, global-variables-in-react-jsx-components, global-variables-in-react-jsx-component, global-variables-in-react-jsx-application, global-variables-in-react-jsx-app, global-variables-in-react-jsx-applications, global-variables-in-react-jsx]
-description: "Learn how to use global variables in your React applications. Unleash the magic of global variables and wield their power to share data across your entire app!"
----
-
-:::note
-*Attention, aspiring Coders! Let's delve into the arcane world of global variables. Fear not, for this knowledge shall empower you to wield their magic with finesse.*
-:::
-
-## The Mysterious Realm of Global Variables
-
-Welcome to the mystical realm of global variables—a source of both power and peril in the world of React. These special entities hold information that can be accessed from anywhere within your enchanted application.
-
-But beware, dear apprentice! With great power comes great responsibility. Mishandling global variables can lead to chaos and tangled spells within your code.
-
-## The Enchantment Spell: Defining a Global Variable
-
-Let us cast the incantation to define a global variable. Within the sacred halls of your `src` folder, create a file named `env.js`. It shall be our vessel to hold the magic:
-
-```js title="src/env.js"
-const globalWizardName = 'Merlin';
-export default globalWizardName;
-```
-
-Behold, `globalWizardName` is now accessible throughout your sorcery, for it has been declared within the mystical realm of global variables!
-
-## The Spellbook: Accessing the Global Variable
-
-Now that we have conjured our global variable, let us learn how to access its power. Within any of your enchanted components, simply recite the `import` spell and invoke the global variable:
-
-```jsx title="src/components/MagicComponent.jsx"
-// src/components/MagicComponent.jsx
-import React from 'react';
-import globalWizardName from '../env';
-
-const MagicComponent = () => {
- return (
-
-
Welcome, esteemed apprentice, to the realm of {globalWizardName}!
Welcome, esteemed apprentice, to the realm of Merlin!
-
Prepare to embark on a journey of magical coding.
-
-
-
-See how `globalWizardName` enriches your component with its knowledge? Embrace its power, but always remember to wield it responsibly.
-
-## The Bewitching Dance: Using the Global Variable in Your Spells
-
-Now that you've grasped the essence of global variables, let us create a spellbinding example using them.
-
-**Step 1:** Create a new component, `SpellComponent.jsx`, and import the global variable:
-
-```js title="src/components/SpellComponent.jsx"
-// src/components/SpellComponent.jsx
-import React from 'react';
-import globalWizardName from '../env';
-
-const SpellComponent = () => {
- const spellText = `Hear my words, for I invoke the great ${globalWizardName}!`;
-
- return (
-
-
Behold the Magic Spell:
-
{spellText}
-
- );
-};
-
-export default SpellComponent;
-```
-
-Step 2: Embrace the unity of spells by adding `SpellComponent` to your main enchantment, `App.js`:
-
-```js title="src/App.js"
-// src/App.js
-import React from 'react';
-import MagicComponent from './components/MagicComponent';
-import SpellComponent from './components/SpellComponent';
-
-const App = () => {
- return (
-
-
-
-
- );
-};
-
-export default App;
-```
-
-
-**Step 3:** Witness the magic come alive as you run your application! The mystical words of the great `{globalWizardName}` shall grace your screen.
-
-
-
-
-
Welcome, esteemed apprentice, to the realm of Merlin!
-
Prepare to embark on a journey of magical coding.
-
-
-
Behold the Magic Spell:
-
Hear my words, for I invoke the great Merlin!
-
-
-
-
-## The Perils of the Dark Arts: Misusing Global Variables
-
-Ah, but heed this warning, dear apprentice! Misusing global variables can lead to unexpected enchantments and tangled webs of code.
-
-**Example of a Dark Spell:**
-
-```js title="src/components/DarkComponent.jsx"
-// src/components/DarkComponent.jsx
-import React from 'react';
-import globalWizardName from '../env';
-
-const DarkComponent = () => {
- globalWizardName = 'Voldemort'; // Oops! You shall not reassign a const from the magical realm!
-
- return (
-
-
Dark Arts Warning:
-
{`Beware, ${globalWizardName} is a name not to be spoken lightly!`}
-
- );
-};
-
-export default DarkComponent;
-```
-
-:::tip
-Greetings, young Code Apprentices! This knowledge is unveiled with `react-scripts@3.0.0` and higher.
-:::
-
-## Unleashing the Power of Global Variables
-
-Behold, the realm of global variables—a mystical concept that grants you the ability to wield data accessible across your entire React kingdom. However, heed this warning, dear beginners: global variables are both a potent weapon and a treacherous pitfall. With great power comes great responsibility.
-
-### The Forbidden Artifact - The Global Object
-
-In the enchanted lands of Create React App, there exists a powerful artifact called the "Global Object." It is an omnipotent entity that can hold any data you desire, accessible from any corner of your kingdom. But beware! Mishandling this artifact may lead to chaos, bugs, and cursed code.
-
-As guardians of the React realm, we advocate for the wise use of global variables. But first, let us uncover their hidden potential.
-
-### Discovering the Global Object's True Form
-
-To conjure the Global Object, you must invoke its essence within your React spells. Fear not, for it is a natural part of the cosmic order and requires no additional incantations.
-
-In your JavaScript tomes, simply access the Global Object using the mystical keyword `window`. Witness its grandeur in the code snippet below:
-
-```jsx
-// A noble variable, fit for the Global Object
-const mysticalData = 'I am available across the realm!';
-
-// Binding the noble variable to the Global Object
-window.globalVariable = mysticalData;
-```
-
-### Beware the Pitfalls of Unbridled Magic
-
-As the wise elders of the React realm advise, global variables must be used with caution. Excessive use of this power may lead to unpredictable behavior and jeopardize the harmony of your code.
-
-Remember, dear apprentices, the React way encourages the use of state management libraries like Redux or React Context for managing shared data. These time-honored practices ensure order and maintain the sanctity of your codebase.
-
-### A Tale of Practicality - A Live Example
-
-Let us weave a tale of practicality, where global variables serve a noble purpose in enhancing our application.
-
-In this example, we shall bestow our React kingdom with a day-night toggle switch—a magical artifact that changes the theme of our site.
-
-```jsx live
-// Within the enchanted lands of React, we create a functional component
-function DayNightToggle () {
- // Embrace the power of state to control the day and night
- const [isDay, setDay] = useState(true);
-
- // A mystical function to toggle the day and night
- const toggleDayNight = () => {
- setDay((prevIsDay) => !prevIsDay);
- };
-
- // The enchanted return statement, where we create the toggle
- return (
-
- );
-}
-```
-
-With this enchanting example, the DayNightToggle component shall bring harmony and joy to your React kingdom, all thanks to the wise use of global variables.
-
-### Parting Wisdom
-
-Remember, dear Code Apprentices, global variables are powerful tools—tools that should be used sparingly and judiciously. Embrace the React way, and you shall discover the true beauty of state management libraries, which offer a more structured and scalable approach to shared data.
-
-Go forth now, and may your React kingdom flourish with enchanted code and mesmerizing user experiences!
-
-## In Conclusion
-
-Congratulations, aspiring wizard! You have unlocked the secrets of global variables and wielded their power in your magical React spells.
-
-But remember, with great power comes great responsibility. Use global variables wisely, and your journey into the enchanted realm of React shall be filled with joy and triumph.
-
-Now, go forth and create wondrous applications, for you are now equipped with the knowledge to conjure and control the magic of global variables!
-
-May your code be bug-free and your spells enchanting. Onwards to new magical horizons!
\ No newline at end of file
diff --git a/docs/react/create-react-app.md b/docs/react/create-react-app.md
deleted file mode 100644
index cc86729bf..000000000
--- a/docs/react/create-react-app.md
+++ /dev/null
@@ -1,65 +0,0 @@
----
-id: create-react-app
-title: Getting Started with React
-sidebar_label: Create React App
-sidebar_position: 1
-description: Development and implementation the API of interaction of two sites
----
-
-Welcome to the React tutorial series! In this comprehensive guide, we will take you through the fundamentals of React, a popular JavaScript library for building user interfaces. Whether you're a beginner or have some experience with web development, this tutorial will provide you with a solid foundation to start building dynamic and interactive web applications using React.
-
-### Content Agenda:
-
-1. Introduction to React
- - What is React?
- - Why use React?
- - React's key features
-2. Setting Up the Development Environment
- - Installing Node.js and npm
- - Creating a new React project
- - Familiarizing with the project structure
-3. Components and JSX
- - Understanding React components
- - Writing JSX code
- - Rendering components
-4. State and Props
- - Managing component state
- - Passing data using props
- - Updating state and re-rendering
-5. Handling Events
- - React event handling
- - Binding event handlers
- - Handling form submissions
-6. Working with Lists and Conditional Rendering
- - Rendering dynamic lists of data
- - Conditional rendering based on state
-7. React Router
- - Introduction to React Router
- - Setting up routes
- - Navigating between pages
-8. Introduction to React Hooks
- - Understanding Hooks
- - useState and useEffect
- - Custom Hooks
-9. Working with APIs
- - Fetching data from APIs
- - Async/await and Promises
- - Error handling and loading states
-10. Deploying React Apps
- - Preparing your app for deployment
- - Deploying to platforms like Vercel or Netlify
- - Optimizing your app for production
-
-Throughout this tutorial, we will provide practical examples, code snippets, and exercises to help reinforce your understanding of React. By the end of the series, you'll have the skills and knowledge to build your own React applications from scratch.
-
-## Feedback
-
-We value your feedback! If you have any suggestions, questions, or issues related to Create React App or this documentation, please don't hesitate to reach out to us. Your input helps us improve the documentation and provide a better experience for all users.
-
-To provide feedback, you can:
-- Send us an email at ajaydhangar49@gmail.com
-- Open an issue on our GitHub repository: [issue](https://github.com/Ajay-Dhangar/code-harbor-hub/issues)
-- Join our community forum and engage in discussions: [Discussions](https://github.com/Ajay-Dhangar/code-harbor-hub/discussions)
-
-We appreciate your contribution in making Create React App even better!
-
diff --git a/docs/react/css/style.css b/docs/react/css/style.css
deleted file mode 100644
index b898eddf2..000000000
--- a/docs/react/css/style.css
+++ /dev/null
@@ -1,20 +0,0 @@
- @media (prefers-reduced-motion: no-preference) {
- .App-logo {
- animation: App-logo-spin infinite 20s linear;
- }
- }
-
- @keyframes App-logo-spin {
- from {
- transform: rotate(0deg);
- }
-
- to {
- transform: rotate(360deg);
- }
- }
-
- .error{
- background-color: red;
- }
-
\ No newline at end of file
diff --git a/docs/react/deployment/_category_.json b/docs/react/deployment/_category_.json
deleted file mode 100644
index 4c6b8fdfb..000000000
--- a/docs/react/deployment/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "Deployment",
- "position": 9,
- "link": {
- "type": "generated-index",
- "description": "5 minutes to learn the most important RoadMap for React Mastery."
- }
- }
\ No newline at end of file
diff --git a/docs/react/deployment/deployment.md b/docs/react/deployment/deployment.md
deleted file mode 100644
index a1969e6e8..000000000
--- a/docs/react/deployment/deployment.md
+++ /dev/null
@@ -1,103 +0,0 @@
----
-id: deployment
-title: Deployment in Create React App
-sidebar_label: Deployment
-sidebar_position: 1
-tags: [react, create-react-app, deployment, vercel, hosting, deployment-platform, production, build, optimization, deployment-steps, deployment-guide, deployment-process, deployment-platforms, deployment-tutorial, deployment-instructions, deployment-in-react, deployment-in-CRA, deployment-in-Create-React-App, Vercel, Vercel-deployment, Vercel-tutorial, Vercel-guide, Vercel-deployment-guide, Vercel-deployment-tutorial, Vercel-deployment-instructions, Vercel-deployment-process, Vercel-deployment-platform, Vercel-deployment-steps]
-description: "Learn how to deploy your Create React App to the internet using Vercel. Follow the steps to optimize your app, choose a deployment platform, and deploy your app with Vercel."
----
-
-
-Congratulations, Coders! You've built an amazing React application using Create React App (CRA), and now it's time to show it to the world. In this guide, we'll walk you through the process of deploying your React app step by step, sprinkled with some fun details along the way!
-
-## What is Deployment?
-
-Imagine you've cooked a delicious pizza, and now you want to share it with your friends at a party. Deployment is like serving your app to the internet so that anyone can access it using a web browser. Just like your friends can enjoy the pizza without knowing the recipe, users can use your app without seeing its code!
-
-## Prerequisites
-
-Before we begin, make sure you have the following:
-
-**1. Your completed React app:** If you haven't built it yet, check out our guides on [creating a React app](../getting-started/getting-started.md) and [building components](../building-your-app/importing-a-component) to get started.
-
-**2. A version control system:** If you haven't set up Git yet, don't worry! It's like a time-travel machine for your code, allowing you to go back in time if needed.
-
-## Step 1: Optimize Your App
-
-Before deployment, let's optimize your React app to make it run faster and smoother. This way, users won't have to wait long for your app to load!
-
-**Fun Fact:** Optimizing your app is like making your pizza taste even better by adding extra cheese and your favorite toppings!
-
-To optimize, open your terminal and navigate to your project's root directory. Run the following command:
-
-```bash
-npm run build
-```
-
-This will create a production-ready version of your app with minimized code and optimized assets. The build folder will be generated, ready for deployment.
-
-## Step 2: Choose a Deployment Platform
-
-Now that your app is ready to be served, you need to choose a platform to deploy it. There are several options, but for simplicity, we'll use Vercel, a fantastic platform that makes deployment a breeze.
-
-**Fun Fact:** Vercel is like a magical teleportation device for your app. It will take your app from your computer to the internet in seconds!
-
-Sign up for a Vercel account at [vercel.com](https://vercel.com) if you haven't already. Don't worry; it's free for most small projects!
-
-## Step 3: Deploy with Vercel
-
-Once you have a Vercel account, follow these simple steps to deploy your app:
-
-1. Install the Vercel CLI (Command-Line Interface) by running this command:
-
-```bash
-npm install -g vercel
-```
-
-2. Log in to your Vercel account using the CLI:
-
-```bash
-vercel login
-```
-
-3. Now, it's time to deploy your app! Run this command in your project's root directory:
-
-```bash
-vercel --prod
-```
-
-**Fun Fact:** Deploying with Vercel is like putting your pizza in a high-speed delivery drone. It will fly your app to the cloud, where users can access it globally!
-
-4. Vercel will provide you with a unique URL for your deployed app. Share this URL with your friends, family, and the world!
-
-## Step 4: Celebrate!
-
-You did it! Your React app is now live on the internet, and anyone can access it. Take a moment to celebrate your achievement!
-
-**Fun Fact:** Celebrating is like enjoying a slice of pizza after all your hard work. You deserve it!
-
-## Updating Your App
-
-As you continue to improve your app, you might want to deploy new versions. Don't worry; it's as easy as eating a second slice of pizza!
-
-1. Make your changes to the app.
-
-2. Run the build command again:
-
-```bash
-npm run build
-```
-
-3. Deploy the updated app to Vercel:
-
-```bash
-vercel --prod
-```
-
-Vercel will take care of updating your app, and the new version will be live in no time!
-
-## Conclusion
-
-You've learned how to deploy your Create React App like a pro! Remember, the more you practice deploying apps, the better you'll become at it. So keep building, optimizing, and deploying!
-
-**Fun Fact:** Just like mastering the art of making pizza, deploying apps will make you a coding maestro!
\ No newline at end of file
diff --git a/docs/react/development/_category_.json b/docs/react/development/_category_.json
deleted file mode 100644
index acef1f498..000000000
--- a/docs/react/development/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "Development",
- "position": 4,
- "link": {
- "type": "generated-index",
- "description": "5 minutes to learn the most important RoadMap for React Mastery."
- }
- }
\ No newline at end of file
diff --git a/docs/react/development/analyzing-the-bundle-size.md b/docs/react/development/analyzing-the-bundle-size.md
deleted file mode 100644
index f79599096..000000000
--- a/docs/react/development/analyzing-the-bundle-size.md
+++ /dev/null
@@ -1,63 +0,0 @@
----
-id: analyzing-the-bundle-size
-title: Analyzing Bundle Size
-sidebar_label: Analyzing Bundle Size
-sidebar_position: 3
-tags: [react, create-react-app, source-map-explorer, bundle-size, performance]
-description: "Learn how to analyze the bundle size of your Create React App project using Source Map Explorer. Identify areas of your codebase that might be bloated and optimize them for better performance."
----
-
-If you want to understand where the excess code in your JavaScript bundles is coming from, you can use a helpful tool called Source Map Explorer. In this guide, we'll learn how to add Source Map Explorer to your Create React App project and analyze the bundle size.
-
-## Installation
-
-To get started, follow these steps:
-
-1. Open your command line interface.
-
-2. If you're using npm, run the following command:
-```sh
-npm install --save source-map-explorer
-```
- If you prefer using yarn, use this command instead:
-```sh
-yarn add source-map-explorer
-```
-
-## Configuration
-
-Once you've installed Source Map Explorer, you need to configure your project to use it. Here's how:
-
-1. Open your `package.json` file.
-
-2. Locate the `"scripts"` section and add the following line:
-```diff
- "scripts": {
-+ "analyze": "source-map-explorer 'build/static/js/*.js'",
- "start": "react-scripts start",
- "build": "react-scripts build",
- "test": "react-scripts test",
-```
- This adds a new script named `"analyze"` that will run Source Map Explorer on your production build.
-
-## Analyzing the Bundle
-
-Now that you've set up Source Map Explorer, it's time to analyze your bundle size. Follow these steps:
-
-1. Run the production build command in your command line interface:
-```sh
-npm run build
-```
- This command generates the optimized and minified version of your React app.
-
-2. After the build process completes, run the analyze script:
-```sh
-npm run analyze
-```
- Source Map Explorer will open in your default browser and display a visual representation of your bundle. It will show you which parts of your code contribute the most to the bundle size.
-
-By analyzing the bundle size, you can identify areas of your codebase that might be bloated and optimize them for better performance.
-
-Congratulations! You now know how to use Source Map Explorer to analyze the bundle size of your Create React App project.
-
-Remember to regularly analyze your bundle size to ensure your app remains fast and efficient.
diff --git a/docs/react/development/developing-components-in-isolation.md b/docs/react/development/developing-components-in-isolation.md
deleted file mode 100644
index 9c51ce431..000000000
--- a/docs/react/development/developing-components-in-isolation.md
+++ /dev/null
@@ -1,83 +0,0 @@
----
-id: developing-components-in-issolation
-title: Developing Components in Isolation
-sidebar_label: Developing Components
-sidebar_position: 2
-tags: [react, storybook, react-styleguidist, components, ui, development, isolation, preview, states, storybook-for-react, react-styleguidist]
-description: "Learn how to develop and preview your React components in isolation from your main app using Storybook or React Styleguidist. Create a convenient way to work on components individually and view all their states."
----
-
-In a typical app, you have various UI components, each having multiple states. Let's take a basic button component as an example, which can have the following states:
-
-- Regular state with a text label.
-- Disabled mode.
-- Loading state.
-
-However, it can be challenging to visualize these states without running a sample app or looking at examples.
-
-By using third-party tools like [Storybook for React](https://storybook.js.org) or [React Styleguidist](https://react-styleguidist.js.org/), you can develop and preview your components in isolation from your main app. These tools provide a convenient way to work on components individually and view all their states.
-
-
-
-Additionally, you can deploy your Storybook or style guide as a static app, allowing your team members to review different UI component states without the need for a backend server or creating app accounts.
-
-## Getting Started with Storybook
-
-Storybook is a development environment specifically designed for React UI components. It enables you to browse a component library, view different states of each component, and interactively develop and test your components.
-
-To set up Storybook in your project, run the following command within your app's directory:
-
-```sh
-npx sb init
-```
-
-Follow the instructions displayed on the screen after running the command.
-
-Here are some resources to learn more about React Storybook:
-
-- [Learn Storybook (tutorial)](https://storybook.js.org/tutorials/)
-- [Documentation](https://storybook.js.org/docs/react/get-started/introduction)
-- [GitHub Repo](https://github.com/storybooks/storybook)
-- [Snapshot Testing UI](https://github.com/storybooks/storybook/tree/master/addons/storyshots) with Storybook + addon/storyshot
-
-## Getting Started with Styleguidist
-
-Styleguidist is another useful tool that combines a style guide, where all your components are presented on a single page with their props documentation and usage examples, and an environment for developing components in isolation, similar to Storybook. In Styleguidist, you write examples in Markdown, and each code snippet is rendered as a live editable playground.
-
-To install Styleguidist, use the following command:
-
-```sh
-npm install --save react-styleguidist
-```
-
-Alternatively, you can use `yarn`:
-
-```sh
-yarn add react-styleguidist
-```
-
-After installing Styleguidist, add the following scripts to your `package.json` file:
-
-```diff
- "scripts": {
-+ "styleguide": "styleguidist server",
-+ "styleguide:build": "styleguidist build",
- "start": "react-scripts start",
-```
-
-To start the Styleguidist server, run the following command within your app's directory:
-
-```sh
-npm run styleguide
-```
-
-Follow the instructions provided on the screen to continue setting up Styleguidist.
-
-Here are some resources to learn more about React Styleguidist:
-
-- [GitHub Repo](https://github.com/styleguidist/react-styleguidist)
-- [Documentation](https://react-styleguidist.js.org/docs/getting-started.html)
-
-Now, whenever you make a commit, Prettier will automatically format the changed files. If you want to format your entire project for the first time, you can run `./node_modules/.bin/prettier --write "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}"`.
-
-To integrate Prettier into your favorite editor, refer to the [Editor Integration](https://prettier.io/docs/en/editors.html) section on the Prettier GitHub page.
diff --git a/docs/react/development/setting-up-your-editor.md b/docs/react/development/setting-up-your-editor.md
deleted file mode 100644
index 883d0f76d..000000000
--- a/docs/react/development/setting-up-your-editor.md
+++ /dev/null
@@ -1,166 +0,0 @@
----
-id: setting-up-your-editor
-title: Setting Up Your Editor
-sidebar_label: Editor Setup
-sidebar_position: 1
-tags: [react, create-react-app, editor, syntax-highlighting, linting, debugging, code-formatting, prettier, vscode, webstorm]
-description: "Learn how to set up your text editor for working with Create React App. Enhance your editing experience and maximize productivity with these tips."
----
-
-When working with Create React App, there are several tools you can use to enhance your editing experience and maximize productivity. Let's go through some tips to get your editor set up correctly.
-
-## Syntax Highlighting
-
-To enable syntax highlighting in your favorite text editor, you can refer to the [Babel documentation page](https://babeljs.io/docs/editors) for instructions. Most popular editors have coverage in the documentation.
-
-## Displaying Lint Output in the Editor
-
-:::note
-- This feature requires `react-scripts@0.2.0` or higher.
-
-- For projects created with `react-scripts@2.0.3` or higher, this feature works out of the box.
-
-- Please ensure you have npm 3 or higher.
-:::
-
-Some editors like Sublime Text, Atom, and Visual Studio Code provide ESLint plugins for displaying linting output in the editor. However, these plugins are not mandatory. You will still see the linting results in your terminal and browser console by default. If you prefer to view the linting results directly in your editor, you can install an ESLint plugin or extension.
-
-Keep in mind that any customizations made to your ESLint config will only affect the editor integration, not the terminal or in-browser lint output. Create React App intentionally provides a minimal set of rules to catch common mistakes.
-
-If you want to enforce a specific coding style for your project, you can consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules.
-
-### Extending or Replacing the Default ESLint Config
-
-You have the option to extend the base ESLint config provided by Create React App or replace it entirely, depending on your needs. Here are a few things to remember:
-
-1. We highly recommend extending the base config instead of removing it completely, as removing it may introduce hard-to-find issues.
-2. When working with TypeScript, you'll need to provide an `overrides` object to apply rules specifically to TypeScript files.
-3. It's important to note that any rules set to `"error"` will prevent the project from building.
-
-In the example below:
-
-- The base config is extended by a shared ESLint config.
-- A new rule is added that applies to all JavaScript and TypeScript files.
-- Another new rule is added that targets TypeScript files only.
-
-```json
-{
- "eslintConfig": {
- "extends": ["react-app", "shared-config"],
- "rules": {
- "additional-rule": "warn"
- },
- "overrides": [
- {
- "files": ["**/*.ts?(x)"],
- "rules": {
- "additional-typescript-only-rule": "warn"
- }
- }
- ]
- }
-}
-```
-
-## Debugging in the Editor
-
-**This feature currently supports only [Visual Studio Code](https://code.visualstudio.com) and [WebStorm](https://www.jetbrains.com/webstorm/).**
-
-Create React App provides built-in support for debugging in Visual Studio Code and WebStorm, allowing you to write and debug your React code seamlessly within the editor. This minimizes the need for context switching between tools and provides a continuous development workflow.
-
-### Visual Studio Code
-
-Make sure you have the latest version of [VS Code](https://code.visualstudio.com) installed.
-
-To enable debugging in VS Code, add the following block to your `launch.json` file, located inside the `.vscode` folder in your app's root directory:
-
-```json
-{
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Chrome",
- "type": "chrome",
- "request": "launch",
- "url": "http://localhost:3000",
- "webRoot": "${workspaceFolder}/src",
- "sourceMapPathOverrides": {
- "webpack:///src/*": "${webRoot}/*"
- }
- }
- ]
-}
-```
-
-:::note
-- If you've adjusted the HOST or PORT environment variables, the URL may be different.
-:::
-Start your app by running `npm start`, and then you can start debugging in VS Code by pressing `F5` or clicking the green debug icon. This allows you to write code, set breakpoints, make changes, and debug your code without leaving the editor.
-
-If you encounter any issues with VS Code debugging, refer to their [troubleshooting guide](https://github.com/Microsoft/vscode-chrome-debug/blob/master/README.md#troubleshooting).
-
-### WebStorm
-
-To use the debugging feature in WebStorm, you'll need [WebStorm](https://www.jetbrains.com/webstorm/) and the [JetBrains IDE Support](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji) Chrome extension installed.
-
-In WebStorm, go to the `Run` menu and select `Edit Configurations...`. Click the `+` button, choose `JavaScript Debug`, and paste `http://localhost:3000` into the URL field. Save the configuration.
-
-:::note
-- If you've adjusted the HOST or PORT environment variables, the URL may be different.
-:::
-
-Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux, or click the green debug icon in WebStorm to start debugging.
-
-You can also use this method to debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine.
-
-## Automatic Code Formatting
-
-Prettier is an opinionated code formatter that supports JavaScript, CSS, and JSON. It helps maintain consistent code style within your project. For more information, you can visit [Prettier's GitHub page](https://github.com/prettier/prettier) or see it in action on their [playground](https://prettier.io/playground/).
-
-To format your code automatically whenever you make a commit in Git, you need to install the following dependencies:
-
-```sh
-npm install --save husky lint-staged prettier
-```
-
-Alternatively, you can use `yarn`:
-
-```sh
-yarn add husky lint-staged prettier
-```
-
-- `husky` enables using Git hooks as if they are npm scripts.
-- `lint-staged` allows running scripts on staged files in Git. You can learn more about it in this [blog post about lint-staged](https://medium.com/@okonetchnikov/make-linting-great-again-f3890e1ad6b8).
-- `prettier` is the JavaScript formatter that will run before commits.
-
-After installing the dependencies, you can ensure that every file is formatted correctly by adding a few lines to the `package.json` file in your project's root.
-
-Add the following field to the `package.json`:
-
-```diff
-+ "husky": {
-+ "hooks": {
-+ "pre-commit": "lint-staged"
-+ }
-+ }
-```
-
-Next, add a `lint-staged` field to the `package.json`, for example:
-
-```diff
- "dependencies": {
- // ...
- },
-+ "lint-staged": {
-+ "src/**/*.{js,
-
-jsx,ts,tsx,json,css,scss,md}": [
-+ "prettier --write"
-+ ]
-+ },
- "scripts": {
-```
-
-Now, whenever you make a commit, Prettier will automatically format the changed files. You can also run `./node_modules/.bin/prettier --write "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}"` to format your entire project for the first time.
-
-To integrate Prettier with your favorite editor, refer to the [Editor Integration](https://prettier.io/docs/en/editors.html) section on the Prettier GitHub page.
\ No newline at end of file
diff --git a/docs/react/development/using-https-in-development.md b/docs/react/development/using-https-in-development.md
deleted file mode 100644
index 64c924d36..000000000
--- a/docs/react/development/using-https-in-development.md
+++ /dev/null
@@ -1,82 +0,0 @@
----
-id: using-https-in-development
-title: Using HTTPS in Development
-sidebar_label: HTTPS in Development
-sidebar_position: 4
-tags: [react, create-react-app, https, development, environment-variables, ssl, certificate, custom-certificate, environment, npm, package.json, .env, create-react-app, CRA, development-server, HTTPS, SSL, SSL certificate, self-signed certificate, custom SSL certificate, environment variables, HTTPS environment variable, SSL_CRT_FILE, SSL_KEY_FILE, start script, .env file, environment variables, environment variables in Create React App, CRA documentation, custom environment variables]
-description: "Learn how to serve your Create React App over HTTPS in development. This is useful when you need to send requests to an API server that requires HTTPS, or when you want to test your site using a secure connection."
----
-
-When you're developing a website using Create React App (CRA), you might need to serve your pages over HTTPS instead of HTTP. This is especially important if you're using the "proxy" feature to send requests from your development server to an API server that requires HTTPS.
-
-### Starting the Development Server with HTTPS
-
-To start the development server with HTTPS, follow these steps:
-
-1. Open your command prompt or terminal.
-
-2. Set the `HTTPS` environment variable to `true`. This tells the development server to use HTTPS.
- - **Windows (cmd.exe):**
- ```cmd
- set HTTPS=true
- ```
-
- - **Windows (PowerShell):**
- ```PowerShell
- $env:HTTPS = "true"
- ```
-
- - **Linux, macOS (Bash):**
- ```sh
- export HTTPS=true
- ```
-
-3. Start the development server by running the following command:
- ```sh
- npm start
- ```
-
- After executing this command, the development server will serve your pages over HTTPS using a self-signed certificate. It's important to note that self-signed certificates are not trusted by default, so your web browser will display a warning when accessing the page. You can safely proceed past the warning to view your site.
-
-### Using a Custom SSL Certificate
-
-If you prefer to use a custom SSL certificate instead of the self-signed certificate, you can follow these additional steps:
-
-1. Set the `HTTPS` environment variable to `true`, as explained in the previous section.
-
-2. Set the `SSL_CRT_FILE` and `SSL_KEY_FILE` environment variables to the paths of your custom certificate and key files.
- - **Linux, macOS (Bash):**
- ```bash
- export HTTPS=true
- export SSL_CRT_FILE=path/to/cert.crt
- export SSL_KEY_FILE=path/to/cert.key
- ```
-
- Replace `path/to/cert.crt` with the actual path to your SSL certificate file, and `path/to/cert.key` with the path to your SSL key file.
-
-3. Start the development server by running the following command:
- ```sh
- npm start
- ```
-
- With these environment variables set, the development server will use your custom SSL certificate for HTTPS connections.
-
-To avoid having to set the environment variables every time you start the development server, you have two options:
-
-1. Update the `start` script in your `package.json` file to include the environment variables. Here's an example of how the `start` script could look:
- ```json
- {
- "start": "HTTPS=true SSL_CRT_FILE=path/to/cert.crt SSL_KEY_FILE=path/to/cert.key react-scripts start"
- }
- ```
-
- Replace `path/to/cert.crt` with the actual path to your SSL certificate file, and `path/to/cert.key` with the path to your SSL key file.
-
-2. Create a `.env` file in your project's root directory and set the `HTTPS` variable to `true`:
- ```
- HTTPS=true
- ```
-
- This approach is useful if you want to keep your environment variables separate from the `package.json` file. However, remember to keep your `.env` file private and never commit it to a public repository.
-
-For more detailed information on using environment variables in Create React App (CRA), you can refer to the [official CRA documentation on adding custom environment variables](https://create-react-app.dev/docs/adding-custom-environment-variables).
\ No newline at end of file
diff --git a/docs/react/getting-started/_category_.json b/docs/react/getting-started/_category_.json
deleted file mode 100644
index ff4bc5f01..000000000
--- a/docs/react/getting-started/_category_.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "label": "Getting Started",
- "position": 3,
- "link": {
- "type": "generated-index",
- "description": "Getting Started with React"
- }
- }
\ No newline at end of file
diff --git a/docs/react/getting-started/available-scripts.md b/docs/react/getting-started/available-scripts.md
deleted file mode 100644
index 31c9ab02c..000000000
--- a/docs/react/getting-started/available-scripts.md
+++ /dev/null
@@ -1,45 +0,0 @@
----
-id: available-scripts
-title: Available Scripts
-sidebar_position: 3
-tags: [react, create-react-app, scripts, npm, start, test, build, eject, react-scripts, react-dom, react-app]
-description: "Learn about the available scripts in a Create React App project. Use these scripts to start, test, build, and eject your app, as well as to run custom scripts."
----
-
-In your project directory, you can use the following scripts:
-
-## `npm start`
-
-This script runs your app in development mode. It starts a local server and opens your app in a web browser at [http://localhost:3000](http://localhost:3000). Whenever you make changes to your code, the page will automatically reload. If there are any errors in your code, you will see them in the console.
-
-## `npm test`
-
-This script launches the test runner in interactive watch mode. It helps you run tests for your app and provides feedback. You can learn more about running tests in the running tests section.
-
-## `npm run build`
-
-This script builds your app for production. It creates an optimized version of your app in the `build` folder. The production build is minified and the filenames include unique hashes to ensure browser caching works correctly. React is also bundled in production mode for better performance. If needed, you can enable class and function names for profiling purposes. You can find more information about the production build process in the production build section.
-
-Your app is now ready to be deployed! Check out the deployment section to learn how to deploy your application to popular hosting providers.
-
-## `npm run eject`
-
-**Note: This is a one-way operation. Once you `eject`, you can't go back!**
-
-If you're not satisfied with the build tool and configuration choices, you can use this script to eject. Ejecting removes the single build dependency from your project.
-
-Instead, it copies all the configuration files and the necessary dependencies (like webpack, Babel, ESLint, etc.) into your project's `package.json`. The distinction between regular dependencies and development dependencies is less important for front-end apps that produce static bundles.
-
-In the past, this separation caused issues with some hosting platforms that didn't install development dependencies. As a result, they couldn't build or test the project properly before deployment. By ejecting, you're free to arrange your dependencies in `package.json` as you see fit.
-
-All the commands except `eject` will continue to work, but they will now refer to the copied scripts, allowing you to customize them. However, from this point forward, you're responsible for maintaining and configuring the build tools on your own.
-
-Remember, you don't have to use `eject`. The pre-configured features are suitable for small to medium deployments, and you're not obligated to use this customization feature. However, we understand that customization is important when you're ready for it. You can read more about the ejecting process in the documentation.
-
-## Custom Scripts
-
-You can also run custom scripts by adding them to the `scripts` section of your `package.json` file. For example, you can add a script to run a linter or a custom build process. You can then run the script using `npm run `. For more information, refer to the custom scripts section.
-
-## Learn More
-
-You can learn more about the available scripts and their usage in the [Create React App documentation](https://create-react-app.dev/docs/available-scripts).
\ No newline at end of file
diff --git a/docs/react/getting-started/folder-structure.md b/docs/react/getting-started/folder-structure.md
deleted file mode 100644
index 9d4f1b673..000000000
--- a/docs/react/getting-started/folder-structure.md
+++ /dev/null
@@ -1,70 +0,0 @@
----
-id: folder-structure
-title: Folder Structure
-sidebar_position: 2
-tags: [react, create-react-app, folder-structure, project-structure, file-structure]
-description: "Learn how to organize your files and folders in a new React project. This structure will help you keep things tidy and make it easier to build and maintain your site."
----
-
-When you create a new project for your website, it's important to organize your files in a specific way. This structure will help you keep things tidy and make it easier to build and maintain your site.
-
-Here's how your project should look like:
-
-```
-my-app
-├── README.md
-├── node_modules
-├── package.json
-├── .gitignore
-├── public
-│ ├── favicon.ico
-│ ├── index.html
-│ ├── logo192.png
-│ ├── logo512.png
-│ ├── manifest.json
-│ └── robots.txt
-└── src
- ├── App.css
- ├── App.js
- ├── App.test.js
- ├── index.css
- ├── index.js
- ├── logo.svg
- ├── serviceWorker.js
- └── setupTests.js
-```
-
-
-Let's break it down:
-
-- **`my-app/`:** This is the main folder for your project. You can choose any name you like for this folder.
-
-- **`README.md`:** This is a file where you can provide information and instructions about your project. It's helpful for others (and yourself) to understand what your website is about and how to use it.
-
-- **`node_modules/`:** This folder contains all the external libraries and packages that your website depends on. You don't need to worry too much about this folder for now. Just know that it's important for your website to work correctly.
-
-- **`package.json`:** This file holds various information about your project, such as its name, version, and dependencies. It's used by tools to manage and build your website correctly.
-
-- **`public/`:** This folder contains files that are publicly accessible from your website. It includes the main HTML file, `index.html`, which serves as the starting point for your site.
-
-- **`src/`:** This folder is where you'll put most of your code. It stands for "source" and holds the JavaScript and CSS files that make up your website.
-
- - **`App.css`:** This file contains styles specific to your main app component, such as colors, layout, and fonts.
-
- - **`App.js`:** This is the main JavaScript file that defines your app component. It's where you'll write most of your code.
-
- - **`App.test.js`:** This file is used for testing your app. You can ignore it for now if you're just starting out.
-
- - **`index.css`:** This file contains styles that apply globally to your entire website.
-
- - **`index.js`:** This is the entry point of your JavaScript code. It's where your app starts and gets rendered on the page.
-
- - **`logo.svg`:** This file is an example of an image file. You can use it for your website's logo or replace it with your own image.
-
-You can delete or rename any files that you don't need for your project. Remember to keep the `public/index.html` and `src/index.js` files as they are, because they're essential for your website to work.
-
-As a beginner, it's recommended to put your JavaScript and CSS files inside the `src` folder to ensure they get processed correctly. Webpack, a tool used for building websites, will take care of bundling and optimizing your code.
-
-Feel free to create additional folders at the top level for organizing your project, like "images" or "docs". However, keep in mind that files in these folders won't be included in the final version of your website when you're ready to publish it.
-
-If you're using Git version control system and your project is not part of a larger repository, a new repository will be initialized, creating a `.git` folder. This helps you track changes to your code and collaborate with others if needed. You can ignore this folder for now if you're not familiar with Git.
\ No newline at end of file
diff --git a/docs/react/getting-started/forms-in-react.md b/docs/react/getting-started/forms-in-react.md
deleted file mode 100644
index f08c598d7..000000000
--- a/docs/react/getting-started/forms-in-react.md
+++ /dev/null
@@ -1,362 +0,0 @@
----
-id: forms-in-react
-title: Forms in React
-sidebar_label: Forms in React
-tags: [react, forms, frontend, web development, tutorial]
-description: Learn how to handle forms in React comprehensively with examples covering controlled components, uncontrolled components, textarea, select, file input, and more. This extensive guide covers theory, usage, features, examples, best practices, alternatives, and advanced techniques.
----
-# Adding Forms in React
-
-You add a form with React like any other element:
-
-```jsx title="Myform.jsx"
-
-function MyForm() {
- return (
-
- )
-}
-const root = ReactDOM.createRoot(document.getElementById('root'));
-root.render();
-```
-
-This will work as normal, the form will submit and the page will refresh.
-
-But this is generally not what we want to happen in React.
-
-## Handling Forms
-
-Handling forms is about how you handle the data when it changes value or gets submitted.
-
-In HTML, form data is usually handled by the DOM.
-
-In React, form data is usually handled by the components.
-
-When the data is handled by the components, all the data is stored in the component state.
-
-You can control changes by adding event handlers in the `onChange` attribute.
-
-We can use the `useState` Hook to keep track of each input's value and provide a "single source of truth" for the entire application.
-
-See the React Hooks section for more information on Hooks.
-
-```jsx title="Myform.jsx"
-import { useState } from 'react';
-import ReactDOM from 'react-dom/client';
-
-function MyForm() {
- const [name, setName] = useState("");
-
- return (
-
- )
-}
-
-const root = ReactDOM.createRoot(document.getElementById('root'));
-root.render();
-```
-
-## Forms
-
-These docs are old and won’t be updated. Go to react.dev for the new React docs.
-
-These new documentation pages teach modern React and include live examples:
-
-- ``
-- `