## Describe the bug <!-- Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know. --> I get `TypeError: (0 , _reactNative.renderHook) is not a function` error. ## Expected behavior <!-- A clear and concise description of what you expected to happen. --> `renderHook` should be a function and work properly ## Steps to Reproduce <!-- Let us know how to reproduce the issue. Include a code sample or share a project that reproduces the issue. Please follow the guidelines for providing a minimal example: https://stackoverflow.com/help/mcve. --> This is what my `Signin.test.js` file contains: ``` import React from 'react'; import { useFormik } from 'formik'; import { render, fireEvent, renderHook } from '@testing-library/react-native'; import Signin from '../../../../src/modules/auth/components/Signin'; import CustomIntlProvider from '../../../__helpers__/CustomIntlProvider'; describe('Signin screen component', () => { test('signup function is called when the button is pressed', () => { const formik = renderHook(() => useFormik({ initialValues: { email: '', password: '' }, onSubmit: jest.fn(), validateOnChange: false, validateOnBlur: false, }), ); const signUp = jest.fn(); const forgotPassword = jest.fn(); const { getByText } = render(<Signin formik={formik} signUp={signUp} forgotPassword={forgotPassword} />, { wrapper: CustomIntlProvider, }); expect(signUp).toHaveBeenCalledTimes(0); fireEvent.press(getByText('btn.signup')); expect(signUp).toHaveBeenCalledTimes(1); }); }); ``` ## Screenshots <!-- If applicable, add screenshots to help explain your problem. --> <img width="566" alt="Captură de ecran din 2022-06-06 la 16 01 30" src="https://user-images.githubusercontent.com/26307699/172165890-649e8b9c-e727-41ee-9098-dee5ae13b883.png"> ## Versions <!-- run following command in terminal of your root project and paste the result down `npx envinfo --npmPackages react,react-native,react-test-renderer,@testing-library/react-native` --> @testing-library/react-native: ^9.1.0 => 9.1.0 react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-test-renderer: 17.0.2 => 17.0.2
Activity
AugustinLF commentedon Jun 8, 2022
The version of RNTL with
renderHookhasn't be released yet.ginnymin commentedon Jun 18, 2022
Anyone have any insight on when the next release will be? I'm also waiting on
renderHookmdjastrzebski commentedon Jun 22, 2022
@thymikee is there anything blocking the release? Seems like working 'renderHook' would be useful to many people.
thymikee commentedon Jun 23, 2022
There was a breaking change right before this feature and I reverted 9.2.0 which had
renderHook. I've released v10 now