Skip to content

Hot loading for Flow not working #31

Description

@neosarchizo

Hi. Because I prefer to use Flow so I forked this repo and migrated to Flow environment.
my repo

But the hot loading is not working.
I added webpack plugins for Flow. But I don't know why it doesn't work.

Activity

  1. NickSeagull commented on Nov 20, 2019

    @NickSeagull

    For some reason, the uppermost component (App) has to be a class in order for the hot-reloading to work

  2. a7ul commented on Nov 20, 2019

    @a7ul
    Collaborator

    Yes, the root component has to be a class component at this time because it uses traditional hot reloading method at the moment. But soon we should be moving to the react's fast refresh ( a fancier version of hot reloading) that should solve this. For the time being, there is that limitation.

  3. a7ul commented on Nov 20, 2019

    @a7ul
    Collaborator

    @neosarchizo Hot reloading doesnt really depend on the type system you use. It makes use of react and webpack's native hot reload feature.

  4. neosarchizo commented on Nov 20, 2019

    @neosarchizo
    Author

    @master-atul Ah I see. But when I use hot loading in CRA project, the root component is function based and the hot loading is working well. Does your hot loading method differ from it?

  5. a7ul commented on Nov 20, 2019

    @a7ul
    Collaborator

    Yes, CRA uses React-hotloader i think which inturn uses react-dom. But since we cant use react-dom, we had to use the hot reloading component (specifically react-proxy) which was previously used with React native aswell (before fast refresh).

    I had a quick look at your code, it should have worked since you only swapped out typescript. But I cant seem to be able to make it work either. Maybe i ll take a look again when I have more time.

    But if we can't make it work, then we might have to wait till we can implement fast refresh instead.

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

      Issue actions