Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Hot reload doesn't work #50

Open
Open
@nikhil-advait

Description

@nikhil-advait

Hot reload works properly with just create-react-app but doesn't work with react-scripts-ts.

I have included following in index.tsx

if ((module as any).hot) {  (module as any).hot.accept('./App', () => {    const NextApp = require('./App').default;    ReactDOM.render(<NextApp />, document.getElementById('root'));  });}

Since I am using create-react-app that uses webpack-2, I have tried following also:

if ((module as any).hot) {  (module as any).hot.accept('./App', () => {    ReactDOM.render(<App />, document.getElementById('root'));  });}

But still it doesn't work. CSS hot reload works btw. I also converted my App component to pure function instead of class but to no avail.

Following are the versions:
create-react-app - 1.3.3
react-scripts-ts - 2.4.0

Please help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp