GithubHelp home page GithubHelp logo

Comments (5)

catamphetamine avatar catamphetamine commented on May 29, 2024

I could add component and store in render.then()
https://github.com/halt-hammerzeit/webapp/blob/master/frontend/code/application.js#L56-L68
Would that solve the issue?

Why do you require reactRoot and store?

from react-pages.

adailey14 avatar adailey14 commented on May 29, 2024

Yes I think that would solve the issue nicely.

The reason I need reactRoot and store, is to use them in a bunch of end-to-end tests. For our tests we are loading the client bundle in a browser (using Karma test runner), and then using react's testutils to simulate clicks and check the results in the dom. React's testutils require you to pass in the react root component in order to simulate events and inspect the react dom afterwards.

The store is useful to have when it is too difficult to simulate the browser events to make something happen, instead you can dispatch actions to the store as part of the test and check the outcome in the react Dom of dispatching the action.

from react-pages.

catamphetamine avatar catamphetamine commented on May 29, 2024

I see.
Try the latest version and render().then(({ component, store, rerender }) => console.log(component, store))

from react-pages.

catamphetamine avatar catamphetamine commented on May 29, 2024

Closed by ee7d2a7

from react-pages.

adailey14 avatar adailey14 commented on May 29, 2024

This is working great as well, thanks!

from react-pages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.