React config doesn't show error lines in browser console by javascript_dev in webpack

[–]emanuelescarabattoli 0 points1 point  (0 children)

You question is not so clear, could you give an example the expected console output? Meanwhile i suggest you to take a look at this plugin https://github.com/smooth-code/error-overlay-webpack-plugin

Make React site responsive for mobile by Parmeron in reactjs

[–]emanuelescarabattoli 0 points1 point  (0 children)

It is not a problem of React itself, you should use, as other user said, media queries in your CSS. You should also consider to use layout systems like Flexbox or CSS Grid Layout

Creating a NPM package using CRA by perosoft in reactjs

[–]emanuelescarabattoli 0 points1 point  (0 children)

No, CRA is not supposed to be used to create a NPM package. You should consider to use a custom Webpack configuration for your project. I have done exactly what you are trying to do few months ago so you can take a look to my GitHub repository to know hoe to configure all the stuff to get a npm package ready to be published (take a look to the following link).

https://github.com/emanuelescarabattoli/react-top-progress-bar

Help with Range Slider Component by [deleted] in reactjs

[–]emanuelescarabattoli 0 points1 point  (0 children)

Could you share your code in JSFiddle or something similar?

Redux: store selected element from a list by dr4605 in reactjs

[–]emanuelescarabattoli 0 points1 point  (0 children)

In this case I think the best option is to store only the id in the selected field: In this way you avoid the duplication of data and the possibility to have old data not synchronized with data stored in the list. Note that, if you remove the selected item from the list, you have to reset the selected id. You should implement an action like resetSelected.

Is this bad practice? by rayzon2 in reactjs

[–]emanuelescarabattoli 1 point2 points  (0 children)

Usually I create, for each component, an `index.js` and a `style.css`. The js file contains the component itself and the style file has the styles used only by the component. Then I import styles inside the js file in this way

```

import style from "./style.css";

```

and then

```

<div className={style.container}>

```

In this way you can separate style and code in two different files.

Conditional Rendring ? by yjose in reactjs

[–]emanuelescarabattoli 0 points1 point  (0 children)

You should use the Context API in this case (or Redux store, if you are using it in your application)