gaearon / gaearon/react-side-effect

Output isn't always based on nesting order

Open
#19 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
74
PR merge metrics
No merged PRs in 30d

Description

I noticed that the documentation here and over at [Helmet](https://github.com/nfl/react-helmet) seems to imply that props get merged based on nesting order, but that's not always the case. It's based on [mounting order](https://github.com/gaearon/react-side-effect/blob/master/src/index.js#L71), which doesn't always === nesting order.

During the lifetime of the app any component can be mounted at any point in the tree, but it gets treated as if it's the innermost component regardless. This is a problem in `react-document-title` for example since it assumes that the last component in the list is the inner-most one (https://github.com/gaearon/react-document-title/blob/master/index.js#L7)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.