react-16 Questions

2

Solved

I am trying to map over the children of a fragment that is in turn a child of a component. For example: const Frag = () => ( <React.Fragment key="test-key"> <div>test1</div>...
Pepin asked 9/2, 2018 at 22:41

13

Solved

Warning: Received `false` for a non-boolean attribute `comingsoon`. If you want to write it to the DOM, pass a string instead: comingsoon="false" or comingsoon={value.toString()}. How do I pass...
Eirena asked 11/4, 2018 at 20:53

3

Solved

I'm currently using React 16 with Suspense and Lazy to code-split my codebase. Although I would like to preload components. In my example below I got two routes. Is there a way to preload Demo as...
Yogurt asked 11/11, 2018 at 20:21

3

Solved

I'm using the latest version (16.6) of React with react-router (4.3.1) and trying to use code splitting using React.Suspense. Although my routing is working and the code did split into several bun...

1

I am using sentry browser with my CRA react application. I create an error-boundary component and I am using it to catch errors. So far so good, I catch the error and successfully log it to sent...
Arlyn asked 24/6, 2019 at 14:32

3

Solved

I am new to react and I am trying to send some data as parameter in history.push. Basically I am calling a method on a button click and inside the method I am calling an api. If I get success resp...

1

I'm just starting on server side rendering a react 16 app using code splitting and dynamic import thanks to webpack 4 and react-loadable. My question might sound stupid but there's something I don...

1

Solved

I am getting following error after upgrading react to 16.x Uncaught TypeError: Cannot read property 'injection' of undefined at injectTapEventPlugin (injectTapEventPlugin.js:23) at eval (i...
Maitland asked 10/9, 2018 at 5:38

1

Solved

So 16.4 "fixes" a bug in getDerivedStateFromProps and now it gets fired both on props change and on state change. Obviously this is intended, coming from this post: https://github.com/facebook/reac...
Villiers asked 18/6, 2018 at 12:44

1

Solved

In console I see this warning: index.js:2178 Warning: Body has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please exte...
Cohbath asked 27/4, 2018 at 11:14

2

Solved

I use React 16.3.1 and next.js. And I put getDerivedStateFromProps inside the class extending PureComponent. Here is the code: Header.js import { PureComponent } from 'react' ... export defa...
Cilia asked 5/4, 2018 at 13:4

2

Solved

Edit: Answer Below I've followed both of these tutorials on youtube (currently there aren't too many) but none of them work for me, it sends me this error from the Provider in the index.js: Tutor...
Sorrows asked 7/4, 2018 at 2:51

1

Solved

I have the following component that renders a series of components. However, I downloaded React 16.2 and tried to use fragments instead of divs, but I get the following error: Error in ./src/conta...
Hangeron asked 3/2, 2018 at 10:8
1

© 2022 - 2024 — McMap. All rights reserved.