Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix context not passed through from primary renderer #84

Merged
merged 1 commit into from
Nov 10, 2018

Conversation

michalochman
Copy link
Owner

@michalochman michalochman commented Nov 9, 2018

This was unintentionally introduced with #72, where parentComponent was not passed via render method used in Stage component to updateContainer call.

The issue surfaces for example when rendering with react-dom and trying to use Provider from react-redux, and then trying to connect PixiJS-based components to Redux store. This won't work as store will not be available in context once ReactPixiFiber kicks in.

@codecov
Copy link

codecov bot commented Nov 9, 2018

Codecov Report

Merging #84 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #84   +/-   ##
=======================================
  Coverage   95.63%   95.63%           
=======================================
  Files          11       11           
  Lines         229      229           
=======================================
  Hits          219      219           
  Misses         10       10
Impacted Files Coverage Δ
src/Stage.js 100% <100%> (ø) ⬆️
src/render.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b824d4c...d7b9928. Read the comment docs.

@michalochman
Copy link
Owner Author

michalochman commented Nov 10, 2018

@0xdevalias
Copy link

This solution is also pointed out here: michalochman/react-pixi-fiber#93.

I'll close this issue now as it is not related to this lib but to React Context API.

In case anyone else stumbles here from Google/etc, react-pixi-fibre now lists this in it's 'caveats' section of the README:

This links to the following React issue:

Which seems to have been closed by this PR:

Which seems to have been included in the React 16.6.0 changelog in this PR:


I haven't looked any deeper into things that that yet, but at least in theory, I would expect that the React side of this bug/issue/weirdness should be fixed now. So it may 'just work'.

Originally posted by @0xdevalias in pixijs/pixi-react#77 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants