diff --git a/.all-contributorsrc b/.all-contributorsrc index 2a0be067..48b07d8e 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -680,6 +680,15 @@ "ideas", "test" ] + }, + { + "login": "mohamedmagdy17593", + "name": "mohamedmagdy17593", + "avatar_url": "https://avatars0.githubusercontent.com/u/40938625?v=4", + "profile": "https://github.com/mohamedmagdy17593", + "contributions": [ + "code" + ] } ] } diff --git a/README.md b/README.md index 7ae254f6..fe43640c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ practices.

[![version][version-badge]][package] [![downloads][downloads-badge]][npmtrends] [![MIT License][license-badge]][license] -[![All Contributors](https://img.shields.io/badge/all_contributors-69-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-70-orange.svg?style=flat-square)](#contributors) [![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc] [![Join the community on Spectrum][spectrum-badge]][spectrum] @@ -216,7 +216,8 @@ Thanks goes to these people ([emoji key][emojis]): | [dadamssg
dadamssg](https://github.com/dadamssg)
[πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=dadamssg "Documentation") | [Yazan Aabed
Yazan Aabed](https://www.yaabed.com/)
[πŸ“](#blog-YazanAabeed "Blogposts") | [Tim
Tim](https://github.com/timbonicus)
[πŸ›](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Atimbonicus "Bug reports") [πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=timbonicus "Code") [πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=timbonicus "Documentation") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=timbonicus "Tests") | [Divyanshu Maithani
Divyanshu Maithani](http://divyanshu.xyz)
[βœ…](#tutorial-divyanshu013 "Tutorials") [πŸ“Ή](#video-divyanshu013 "Videos") | [Deepak Grover
Deepak Grover](https://www.linkedin.com/in/metagrover)
[βœ…](#tutorial-metagrover "Tutorials") [πŸ“Ή](#video-metagrover "Videos") | [Eyal Cohen
Eyal Cohen](https://github.com/eyalcohen4)
[πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=eyalcohen4 "Documentation") | [Peter Makowski
Peter Makowski](https://github.com/petermakowski)
[πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=petermakowski "Documentation") | | [Michiel Nuyts
Michiel Nuyts](https://github.com/Michielnuyts)
[πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=Michielnuyts "Documentation") | [Joe Ng'ethe
Joe Ng'ethe](https://github.com/joeynimu)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=joeynimu "Code") [πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=joeynimu "Documentation") | [Kate
Kate](https://github.com/Enikol)
[πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=Enikol "Documentation") | [Sean
Sean](http://www.seanrparker.com)
[πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=SeanRParker "Documentation") | [James Long
James Long](http://jlongster.com)
[πŸ€”](#ideas-jlongster "Ideas, Planning, & Feedback") [πŸ“¦](#platform-jlongster "Packaging/porting to new platform") | [Herb Hagely
Herb Hagely](https://github.com/hhagely)
[πŸ’‘](#example-hhagely "Examples") | [Alex Wendte
Alex Wendte](http://www.wendtedesigns.com/)
[πŸ’‘](#example-themostcolm "Examples") | | [Monica Powell
Monica Powell](http://www.aboutmonica.com)
[πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=M0nica "Documentation") | [Vitaly Sivkov
Vitaly Sivkov](http://sivkoff.com)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=sivkoff "Code") | [Weyert de Boer
Weyert de Boer](https://github.com/weyert)
[πŸ€”](#ideas-weyert "Ideas, Planning, & Feedback") [πŸ‘€](#review-weyert "Reviewed Pull Requests") | [EstebanMarin
EstebanMarin](https://github.com/EstebanMarin)
[πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=EstebanMarin "Documentation") | [Victor Martins
Victor Martins](https://github.com/vctormb)
[πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=vctormb "Documentation") | [Royston Shufflebotham
Royston Shufflebotham](https://github.com/RoystonS)
[πŸ›](https://github.com/kentcdodds/react-testing-library/issues?q=author%3ARoystonS "Bug reports") [πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=RoystonS "Documentation") [πŸ’‘](#example-RoystonS "Examples") | [chrbala
chrbala](https://github.com/chrbala)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=chrbala "Code") | -| [Donavon West
Donavon West](http://donavon.com)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=donavon "Code") [πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=donavon "Documentation") [πŸ€”](#ideas-donavon "Ideas, Planning, & Feedback") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=donavon "Tests") | [Richard Maisano
Richard Maisano](https://github.com/maisano)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=maisano "Code") | [Marco Biedermann
Marco Biedermann](https://www.marcobiedermann.com)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=marcobiedermann "Code") [🚧](#maintenance-marcobiedermann "Maintenance") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=marcobiedermann "Tests") | [Alex Zherdev
Alex Zherdev](https://github.com/alexzherdev)
[πŸ›](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Aalexzherdev "Bug reports") [πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=alexzherdev "Code") | [AndrΓ© Matulionis dos Santos
AndrΓ© Matulionis dos Santos](https://twitter.com/Andrewmat)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=Andrewmat "Code") [πŸ’‘](#example-Andrewmat "Examples") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=Andrewmat "Tests") | [Daniel K.
Daniel K.](https://github.com/FredyC)
[πŸ›](https://github.com/kentcdodds/react-testing-library/issues?q=author%3AFredyC "Bug reports") [πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=FredyC "Code") [πŸ€”](#ideas-FredyC "Ideas, Planning, & Feedback") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=FredyC "Tests") | +| [Donavon West
Donavon West](http://donavon.com)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=donavon "Code") [πŸ“–](https://github.com/kentcdodds/react-testing-library/commits?author=donavon "Documentation") [πŸ€”](#ideas-donavon "Ideas, Planning, & Feedback") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=donavon "Tests") | [Richard Maisano
Richard Maisano](https://github.com/maisano)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=maisano "Code") | [Marco Biedermann
Marco Biedermann](https://www.marcobiedermann.com)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=marcobiedermann "Code") [🚧](#maintenance-marcobiedermann "Maintenance") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=marcobiedermann "Tests") | [Alex Zherdev
Alex Zherdev](https://github.com/alexzherdev)
[πŸ›](https://github.com/kentcdodds/react-testing-library/issues?q=author%3Aalexzherdev "Bug reports") [πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=alexzherdev "Code") | [AndrΓ© Matulionis dos Santos
AndrΓ© Matulionis dos Santos](https://twitter.com/Andrewmat)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=Andrewmat "Code") [πŸ’‘](#example-Andrewmat "Examples") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=Andrewmat "Tests") | [Daniel K.
Daniel K.](https://github.com/FredyC)
[πŸ›](https://github.com/kentcdodds/react-testing-library/issues?q=author%3AFredyC "Bug reports") [πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=FredyC "Code") [πŸ€”](#ideas-FredyC "Ideas, Planning, & Feedback") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=FredyC "Tests") | [mohamedmagdy17593
mohamedmagdy17593](https://github.com/mohamedmagdy17593)
[πŸ’»](https://github.com/kentcdodds/react-testing-library/commits?author=mohamedmagdy17593 "Code") | + This project follows the [all-contributors][all-contributors] specification. diff --git a/src/index.js b/src/index.js index 31f99339..89a31e2c 100644 --- a/src/index.js +++ b/src/index.js @@ -25,15 +25,13 @@ function render( // they're passing us a custom container or not. mountedContainers.add(container) - if (hydrate) { - act(() => { + act(() => { + if (hydrate) { ReactDOM.hydrate(ui, container) - }) - } else { - act(() => { + } else { ReactDOM.render(ui, container) - }) - } + } + }) return { container, baseElement,