News Articles reactjs

Sharing My Blockchain Development Learning Experience: Building a Cryptocurrency Exchange App and…

Sharing My Blockchain Development Learning Experience: Building a Cryptocurrency Exchange App and an ERC-20 Token (Part 1) A new year, a new programming language, a new tech stack, a new skill, a new me! I am currently learning blockchain and web3 development, so I thought I should document my experience on the entire process of creating my […]

Build a simple Modal Component with React

I love modals because they save a lot of time required to load a new tab. In this post, we’re going to learn how to create an awesome reusable modal with React from scratch. These are the steps for this tutorial: What we’ll learn Create a simple file structure Use react toggle state to build a simple modal […]

Optimizing UI performance with React.PureComponent and Shallow Comparison

Continue reading on Level Up Coding » Source: Level Up Coding

Performance Optimizations using Redux Reselect

Continue reading on Level Up Coding » Source: Level Up Coding

Optimizing Performance Using the useMemo Hook in React.js

Continue reading on Level Up Coding » Source: Level Up Coding

Optimizing Performance Using React.memo

Continue reading on Level Up Coding » Source: Level Up Coding

Wrong git branch loaded in node_modules by yarn install command

I have two Typescript projects. Context: ProjectA depends upon a certain ProjectB branch project ProjectB git branches: main -> new_branch ProjectA package.json "dependencies": { "@projectB": "git+", } What I want to achieve? When I execute yarn install to make sure that the dependencies from the new_branch are loaded in node_modules folder of projectA. What actually […]

Passing `id` to `useCallback` when using `react-autosave`?

In the README of react-autosave, it’s mentioned I should use useCallback but I’m not sure how to pass id to it as I need that in the mutation. id & text is everchanging in my case. const updateDraft = useCallback( (newText: string) => { console.log(‘updateDraft’) console.log({ id:, text: newText }) updateDocs({ id:, text: […]

How to get error message in Redux toolkit?

How to display default error action.message in reactjs toolkit? Got a reducer: … getQueryFail: state => { state.loading = false state.errors = true } … And actions dispatch: … catch(error){ dispatch (getQueryFail()) } …. How to display error message on fail action? Source: React – Stack Overflow

How do I change the back button image in stack navigator in react native?

I’ve already seen documents but I don’t really understand and I want somebody to show me how to change the image of the back button in react native. enter image description here I want to change the back arrow to a chevron or something. Could you please show me the code on how to do […]

"ERROR db._checkNotDeleted is not a function" when trying to update my database

I’m trying to make simple sign-in function for my web using firebase however I’m getting an error saying: ERROR db._checkNotDeleted is not a function my Firebase versions is 9 and React is running on 17.0.2. This is my firebase config file snippet (Will hide configurations since its unnecessary): import { initializeApp } from "firebase/app"; import […]

React: Axios Error "Error: Network Error", My react app cannot receive response

I hava Nodejs Express Backend, React Frontend. I checked if frontend sends a request to the backend and that request is sent to backend. And the backend sends a response to the frontend but cannot receive. Frontend — request –> Backend checked. and the request reaches the backend. Frontend <– response — Backend During the […]

How do I loop through a array type field from Firebase/Firestore Cloud Database?

I am using ReactJS to try and build a web app with a Firestore Database backend. And I am currently attempting to query my Firestore Database. I am attempting to query an element from an array from a document in a collection. I have successfully queried to the array level, but I am having trouble […]

is there any solutions to this typeError in my code– here is my code on github the error in my code Source: React – Stack Overflow

How to submit form onClick when no validation errors with MDBootstrap React?

I’m trying to use MDBootstrap-React to validate the form and only send an email with EmailJS if all fields are valid. If I use <form onSubmit={sendEmail}> where it is, the validation errors disappear and no email. I tried putting the onSubmit={sendEmail} inside MDBValidation, the errors work, but it sends the email onClick with the errors. […]

Refreshing data received from api in React best practice

I am new to React and I am working on a simple project wherein I have an api with some data where that data changes every 2-3 seconds. Till now I was doing something like this : const [Data, setData] = useState([]); const[Data,setData] = useState([]) useEffect(() => { fetch(‘api-url’).then((result) => { result.json().then((resp) => { setData(resp); […]

Invalid hook call when using useCallback to a function with hooks

I am trying to call a function that contains hooks from a button’s event handler. I thought that using useCallback would work well for this, but I seem to be getting an error with this. Below is a rough version of what I am attempting and have verified this to also cause my issue: component.jsx […]

How to cancel a payment that awaits confirmation in Metamask using web3?

I’m working on a crypto payment system using ethers Web3Provider web3.eth.sendTransaction(transactionObject) After the user calls this method, this dialog is shown: In the app the user is able to close the payment dialog leaving this pending. Is there a way to reject this payment using JS when closing the dialog inside the app? Clearing all […]

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.