It's documentation says that while dealing with async code, expect.assertions(x) should be written. What exactly do assertions refer to? Is it a term of plain J
I'm writing test for a component with ref. I'd like to mock the ref element and change some properties but have no idea how to. Any suggestions? // MyComp.jsx
In a React application that we are developing we use QA IDs for Selenium tests. Is it bad practice to leave them in the code base in production (live)? If so,
I have a react/nextjs app and I have firebase.js as follow: import firebase from 'firebase/app' import 'firebase/auth' import 'firebase/analytics' import 'fireb
I am trying to use npx create-react app but i have errors that is shown below: npm ERR! Unexpected end of Json input while parsing near '...eact-app/-/create-r
I'm trying to get the value of a file input so that I can make a custom file input. But when I try to pass the value using onChange prop the value is not passin
I am working on a chat box where I need to show the messages of users by grouping the messages on a particular date. The grouping has been working fine so far.
I have used this code as the private route, but I want a another separate route only for admins. How can I change the code? import React from 'react'; import {
As stated above, I can't seem to get the categories to re-render when I am using the react-highchart library. I seem to be able to set the data of the chart val
I just started with React.js and I am unable to import component. I have this structure as followed by this tutorial (YouTube link) : -- src ----| index.html
On react-table when the table is sorted and data changes, the table can either reset (go to default sort state) or re-sort (by putting the edited row in the cor
I´m using Webpack 4, Babel 7 and Emotion 10. I installed @emotion/core @emotion/styled and the recommended plugin babel-plugin-emotion styled is working
On npm install, I am getting the following "peer dependency not installed" warnings: npm WARN [email protected] requires a peer of react@^0.14.1 but none is i
I'm getting a weird error: Unhandled rejection Error: EACCES: permission denied, mkdir '/home/ubuntu/.npm/_cacache/index-v5/14/36'atus I just install npm (6.
Im doing the exercises to learn react native on codecademy. I am told "In React, properties are passed as objects on the first parameter to our components. You
I'm trying to test that a component updates as it should due to changes in an input element. I use the fireEvent.change()-function, and if I then check the valu
I have this code: <Link to="/dashboard" style={{ color: '#A4A4A4' }}>Dashboard</Link> As part of my app, but if i'm currently viewing the /dashboa
I am working on reactjs project using material-ui. Web-page is working perfect on desktop layout but when I switch layout to responsive (mobile). Than all the t
I have a component that consists of several other components such as text fields, and when an input is made to the text field, all other components are re-rende
How to target the active Link in Next.js like they way we do it in React-Router-4? Meaning, give the active link a class when its route is active?