reactjs

Backend in Create React App

I started learning React, built a project using the Create React App, and now I want to start making the server part on Node. ... ds and where the backend begins, when both are written in JS, as if I can not understand something obvious and self-evident.

Debugging JS in react applications that use REST

Dear sirs, there is a question related to debugging js when using react. The story was arranged as follows: First, I develo ... xt of the error in the form of an image: If you can see something in it, what I missed - please write. Thank you in advance!

react-yandex-maps getting the nearest coordinates relative to the marker

Actually, the problem is the following, the react ya map documentation is extremely not very good. It is necessary to get the ... />} </Map> </YMaps> ); } }

Get the value from the Redux Store

There is a movie reducer const initialState = { movies: [], movie: {} }; const moviesReducer = (state = initialState ... e reason in the child component, I get a new version of the repository that no longer filled with movies. What is the reason?

How to assign props to state in React

There is a parent List component.js in which on the componentDidMount hook I get the categories that I will use in this compo ... ories={this.state.categories} addPost={this.addPost} /> </div> ); } } export default List;

The onSubmit event does not work. React

There is a form component with a button: export class Form extends Component { changeDateTextHandler = ({ target }) => ... n you press enter/the button, the same action occurs. But I can't understand why the onSubmit event doesn't work on the form.

React. Error when importing an object (Attempted import error)

Standard scheme: there are several files with constant objects in the same folder, sent for export to index.js for further ge ... s used in other projects, but relative paths were used there. Maybe because of this, webpack can't build the files correctly?

Why is NaN output and how to fix it?

At the beginning, the value of positive is NaN, then, after positive, bad or neutral is added, NaN changes the value: import ... neutral + bad))*100)}</p> </div> </div> ) } export default App;

onChange and onKeyPress

I'm doing a site search, but ran into a problem when I hang the input 2 events onChange and onKeyPress, then onChange just re ... rderRadius: "5px"}} value={value.search} onChange={onChange} onKeyPress={onKeyPress} placeholder="Поиск"/> </form>)

How to use useSelector in react + redux + typescript?

Using useSelector an error occurs Property 'reducer' does not exist on type 'DefaultRootState'.ts(2339)

Where can I learn Redux?

Good afternoon, everyone. I decided to study Redux. Tell me the Russian-language materials. For example, video lessons or art ... rstand the very meaning and essence of its use, but I don't really understand how to write its code. I will use it in React.

React js write to local storage

It is necessary after closing the browser, when opening it again, all the tasks in todo were saved. Website: https://react-to ... } removeTodo={removeTodo} updateTodo={updateTodo} /> </> ); } export default TodoList;

implementation of react drag and drop, determining the location relative to other elements

I need a fresh look. I implement drag and drop in react (not HTML draggable, via mouseup/mousemove), I want to do interactive ... ot to deviate from the logic of react, perhaps you can tell me some fresh ideas? The entire code can be viewed in codesandbox

The react component is rendered multiple times when using useEffect

I use the react functional component with hooks. const [loaded, setLoaded] = React.useState(null); const [title, setTitle] = ... In this case, there are no two renderings, although the state changes 2 times too. I can't understand why this is happening.

How to configure CSS module in webpack without create-react-app?

In the base assembly create-react-app, you can encapsulate CSS by adding .module. Plus, after the build, the BEM methodology is applied to them, what modules or other things are needed for this in webpack?

How do I make an animated background? React/CSS

Good evening, everyone! Please help me, I'm creating a website and I want to put an animation-gif on the background. There is ... > <p>Посмотреть на карте></p> </div> </div>) } } export default Contacts;

How to remove the percentage icon in the react-router-dom address bar

I use react-router-dom to go to the details page about the movie. In the path, I specify pathname: `/about/${value.title}`, ... <Switch> <Route path="/about/:name" children={<ChooseFilm />} /> </Switch> Thanks!

How do I dynamically change state in react js?

I have the main App component, I passed an array of objects to its state, and then I passed this array of objects through th ... /div> ) })} </div> ) } } export default Products;

How to implement the execution of a function when a button is clicked in another function and pass a parameter

There are two functions News list "News" and detailed view "NewsDetail" How to implement that when you click on the button in ... <Button title="Подробнее"></Button> </Card> </SafeAreaView> ); }

Getting a post and displaying its content (WordPress REST API)

I can't adequately display the post on my page, relying on the REST API. There is a site on local hosting. There is the follo ... ately together with HTML tags and it is also displayed on the page with tags. How can I output this text without tags in JSX?