Skip to content

Is it possible to get hot-reload with typescript working? #6503

Closed
@kanekv

Description

@kanekv
No description provided.

Activity

kumar303

kumar303 commented on Feb 25, 2019

@kumar303

Why not? It seems like it should be possible: https://github.com/gaearon/react-hot-loader#typescript

I was able to get it working by adding react-app-rewire-hot-loader but that starts to complicate things.

kanekv

kanekv commented on Feb 28, 2019

@kanekv
Author

@kumar303 does it work at all? What are complications?

kumar303

kumar303 commented on Feb 28, 2019

@kumar303

@kumar303 does it work at all?

Yes, after following the instructions in react-app-require-hot-loader, hot reloads seem to be working just fine. This is all I had to change in a standard create-react-app project: https://github.com/mozilla/addons-code-manager/pull/276/files

What are complications?

Well, it involves replacing all react-scripts commands with react-app-rewired. This makes me think that upgrading to new versions of react-scripts would be difficult. Also, it would introduce a non-officially supported babel/webpack configuration which might get out of sync with react-scripts and might create confusing bugs. It's not as bad as ejecting, though.

kanekv

kanekv commented on Feb 28, 2019

@kanekv
Author

It seems it works with that setup, closing this issue.

kumar303

kumar303 commented on Mar 5, 2019

@kumar303

It seems it works with that setup, closing this issue.

Could you please re-open the issue so that it gets fixed properly in create-react-app?

reopened this on Mar 5, 2019
stale

stale commented on Apr 4, 2019

@stale

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

kumar303

kumar303 commented on Apr 5, 2019

@kumar303

Could someone from the team please consider this feature? I think it's really important.

As an example: sometimes I need to perform a few clicks to set up my UI in a state for development. Without proper hot reloading, the whole page gets reloaded as I edit files and I lose my state.

iansu

iansu commented on Apr 5, 2019

@iansu
Contributor

We would be happy to consider this feature but without someone from the community doing the work and submitting a PR it's probably not going to happen. We have very limited resources and can barely keep up with all the issues and PRs that come in every day.

kumar303

kumar303 commented on Apr 5, 2019

@kumar303

OK, I can look into making a patch for it. I just wanted to make sure there wasn't already some reason that hot reloading is disabled.

iansu

iansu commented on Apr 5, 2019

@iansu
Contributor

I think the reason is just that it's tricky to get it working properly.

23 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @kumar303@iansu@kanekv@esetnik@saranshkataria

        Issue actions

          Is it possible to get hot-reload with typescript working? · Issue #6503 · facebook/create-react-app