@@ -189,14 +189,16 @@ object ReactTestUtils {
189189
190190 // ===================================================================================================================
191191
192- def modifyProps [P , S , B ](c : ScalaComponent [P , S , B , CtorType .Props ])(m : ScalaComponent .Mounted [P , S , B ], f : P => P ): ScalaComponent .Mounted [P , S , B ] = {
192+ def modifyProps [P , U <: GenericComponent .Unmounted [P , M ], M <: GenericComponent .MountedImpure [P , _]]
193+ (c : GenericComponent [P , CtorType .Props , U ], m : M )(f : P => P ): M = {
193194 val container = m.getDOMNode.parentNode
194195 val p2 = f(m.props)
195196 c(p2).renderIntoDOM(container.domCast[org.scalajs.dom.raw.Element ])
196197 }
197198
198- def replaceProps [P , S , B ](c : ScalaComponent [P , S , B , CtorType .Props ])(m : ScalaComponent .Mounted [P , S , B ], p : P ): ScalaComponent .Mounted [P , S , B ] =
199- modifyProps(c)(m, _ => p)
199+ def replaceProps [P , U <: GenericComponent .Unmounted [P , M ], M <: GenericComponent .MountedImpure [P , _]]
200+ (c : GenericComponent [P , CtorType .Props , U ], m : M )(p : P ): M =
201+ modifyProps(c, m)(_ => p)
200202
201203 private val reactDataAttrRegex = """ \s+data-react\S*?\s*?=\s*?".*?"""" .r
202204 private val reactTextCommentRegex = """ <!-- /?react-text[: ].*?-->""" .r
0 commit comments