Commit graph

21 commits

Author SHA1 Message Date
aryan262
37851906f2 "Added useCallback import from 'react' in popup.js" 2024-09-09 12:25:00 +05:30
aryan262
6157de24fa "Refactor popup.js: Extract functions into useCallback, simplify useEffect callbacks, and remove unnecessary returns." 2024-09-09 12:17:36 +05:30
minowau
508feef8a1 Hot Module Replacement (HMR) Integration
solving issue #1255

This project implements Hot Module Replacement (HMR) for a React-based Chrome extension, allowing developers to see real-time changes in their popup component without needing to refresh the entire extension. The following outlines the configuration and structure necessary for achieving this setup.

#### Key Components

1. **Webpack Configuration (`webpack.config.js`)**:
   - Configures Webpack for development and production modes, specifying the entry point and output settings.
   - Enables HMR in the development server for instant updates.

2. **Entry Point (`src/popup.js`)**:
   - Contains the main logic for the popup component, integrating the HMR logic to allow for module updates without a full reload.

3. **Index File (`src/index.js`)**:
   - Updated to support HMR with checks for `module.hot`, ensuring that the component re-renders on updates without refreshing the entire popup.

4. **Package Configuration (`package.json`)**:
   - Includes scripts for building and serving the application, specifying configurations needed for both development and production.

5. **Development Server**:
   - The command `npm start` launches a development server with HMR enabled, providing a smooth development experience.

#### Summary of Changes

- **HMR Logic**:
  - Added in `popup.js` using `if (module.hot) { ... }` to ensure updates are reflected in real-time.
  - Implemented in `index.js` to facilitate automatic re-rendering of the popup component on code changes.

- **Webpack Dev Server**: Configured with `hot: true` to support HMR functionality.

- **File Structure**: Organized files into a clear structure, facilitating maintainability and ease of access.

### Benefits

Implementing HMR improves the development workflow by reducing the time spent on refreshing and waiting for the extension to reload. This results in a more productive environment, allowing for faster iteration and debugging of features.
2024-07-14 10:39:18 +05:30
Manoj Vivek
4e4d012663 version update 2020-06-16 22:44:15 +05:30
Manoj Vivek
ddd5c23431 Website URL change 2020-06-16 21:25:21 +05:30
Manoj Vivek
be0b464e48 Browser extension release script fix 2020-05-28 19:03:08 +05:30
Manoj Vivek
442153b9a3 With a feedback message when the app is not installed 2020-05-28 14:18:21 +05:30
Manoj Vivek
b6f84086f1 Open URL with status callbacks to show appropriate message as feedback 2020-05-27 22:27:52 +05:30
Manoj Vivek
9f4a209675 Open the current browser url in the App when the extension icon is clicked, resolves #78 2020-05-27 19:52:12 +05:30
Manoj Vivek
6ac976eeec Browser extension initial commit 2020-05-27 18:59:18 +05:30
Manoj Vivek
62ba0268cd Code cleanup - browser extension 2020-01-31 14:07:43 +05:30
Manoj Vivek
7d4c6e926e Modifying content security policy 2019-08-09 15:06:14 +05:30
Manoj Vivek
4008e1811c Added new devices - iPad Pro and Laptop 2019-08-05 20:21:48 +05:30
Manoj Vivek
82550a9b30 Zoom vertical slider 2019-08-05 20:21:14 +05:30
Manoj Vivek
25825504f8 Improved header and zoom component 2019-08-04 19:15:17 +05:30
Manoj Vivek
e6730299af Integrated Redux with thunk for state management 2019-08-04 18:51:21 +05:30
Manoj Vivek
815daac9a0 Overriding X-Frame-Options for the urls that are being processed 2019-08-03 22:09:13 +05:30
Manoj Vivek
3fc982b109 Webpack config fixed 2019-08-03 22:08:04 +05:30
Manoj Vivek
cecf58d23e Fixed test setup 2019-07-21 19:00:40 +05:30
Manoj Vivek
6c99000c7f Merged app into extension 2019-07-19 18:14:48 +05:30
Manoj Vivek
bba49215bf Browser extension - initial commit 2019-07-12 22:00:28 +05:30