Skip to content

fix: Re-instantiation issue on parent update #659

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

Merged
merged 1 commit into from
Oct 19, 2021
Merged

Conversation

realamirhe
Copy link
Collaborator

@realamirhe realamirhe commented Oct 16, 2021

The updated node for a ref in react life cycle seems to have an issue with react-aptor or plyr which need more time for investigation, I used class selector instead to get the latest version of a video element node by plyr package itself.

It is backward compatible but is a hotfix bug which the user must know, Is there a need for doc update or new version announcement?

let index = 0
const Plyr = React.forwardRef<APITypes, PlyrProps>((props, ref) => {
  // ...
  index += 1

  return (
    <video className={`plyr-react plyr ${index}`}   {...rest}  />
  )
})

result of log statement for first render (<App>0</App>)and second render (<App>1</App>) called in instantiate function

console.log(node, document.querySelector('.plyr-react'))

image

Fixes: #654

@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Oct 16, 2021
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vizipi
Copy link

vizipi bot commented Oct 16, 2021

Pull request analysis by VIZIPI

Below you will find who is the most qualified team member to review your code.
This analysis includes his/her work on the code included in this Pull request, in addition to their experience in code affected by these changes ( partly found within the list of potential missing files below )   Feedback always welcome

Reviewers with knowledge related to these changes

Match % Person Commit Count Common Files
100.00 % Chintan Prajapati 62 2
100.00 % Takeshi Iwana 18 2
50.00 % Tony Narlock 3 1

Potential missing files from this Pull request

files commonly committed with a subset of this pr, but not committed this time. (click to collapse)
FilePercentilerate
package.json75.00 %9 out of 12 times

Committed file ranks

(click to expand)
  • 99.59%[package-lock.json]
  • 93.42%[src/index.tsx]
  • @vizipi vizipi bot requested review from chintan9 and iwatakeshi October 16, 2021 16:10
    @chintan9
    Copy link
    Owner

    Let me release as alpha version so we can test it.

    It is backward compatible but is a hotfix bug which the user must know, Is there a need for doc update or new version announcement?

    @chintan9 chintan9 merged commit 63b6ba6 into master Oct 19, 2021
    @trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Oct 19, 2021
    @realamirhe
    Copy link
    Collaborator Author

    realamirhe commented Oct 20, 2021

    Let me release as alpha version so we can test it.

    These are known issues that can be announced to be tested again #654 #605 #511 #654 #474 #562

    @realamirhe
    Copy link
    Collaborator Author

    In the overall ref seems to be a better option for dom referencing even in SSRs 😄
    But I guess this version can eliminate lots of bugs and we can talk more about the future of it soon.
    @chintan9, Is there a way we can contact more often, e.g. via email or social media?

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    ✨ Merged Pull Request has been merged successfully size/XS
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    How about keep state?
    2 participants