CharlesStover / Use Force Update
Licence: mit
React Hook to force your functional component to update.
Stars: ✭ 142
Programming Languages
typescript
32286 projects
Projects that are alternatives of or similar to Use Force Update
Quicksort Js
An implementation of Quicksort in JavaScript/TypeScript.
Stars: ✭ 60 (-57.75%)
Mutual labels: npm, travis-ci, travis
Fetch Suspense
A React hook compatible with React 16.6's Suspense component.
Stars: ✭ 479 (+237.32%)
Mutual labels: npm, travis-ci, travis
Reactn
React, but with built-in global state management.
Stars: ✭ 1,906 (+1242.25%)
Mutual labels: npm, travis-ci, travis
Use React Router
React Hook for pub-sub behavior using React Router.
Stars: ✭ 575 (+304.93%)
Mutual labels: npm, travis-ci, travis
Use Clippy
React Hook for reading from and writing to the user's clipboard.
Stars: ✭ 139 (-2.11%)
Mutual labels: npm, travis-ci, travis
Ci Detector
Detect continuous integration environment and get information of current build
Stars: ✭ 138 (-2.82%)
Mutual labels: travis-ci, travis
react-multi-context
Manage multiple React 16 contexts with a single component.
Stars: ✭ 19 (-86.62%)
Mutual labels: travis-ci, travis
Condition Travis
🚫 semantic-release plugin to check Travis CI environment before publishing.
Stars: ✭ 9 (-93.66%)
Mutual labels: travis-ci, travis
Angular Library Starter Kit
Angular 5 Library Starter Kit based on Angular-CLI
Stars: ✭ 35 (-75.35%)
Mutual labels: npm, travis-ci
Automatic Release
Automates the release process for GitHub projects.
Stars: ✭ 46 (-67.61%)
Mutual labels: npm, travis
react-innertext
Returns the innerText of a React JSX object.
Stars: ✭ 37 (-73.94%)
Mutual labels: travis-ci, travis
todo-list
TodoList using Ionic2/3 & Firebase: * PWA * SSO Google plus. * Share list via QRcode. * Upload image from Camera or Storage. * Speech Recognition.
Stars: ✭ 18 (-87.32%)
Mutual labels: travis-ci, travis
Node Developer Boilerplate
🍭 Boilerplate for ES6+ Node.js and npm Developer
Stars: ✭ 82 (-42.25%)
Mutual labels: npm, travis-ci
Realm Browser
Android Database Browser for realm-java
Stars: ✭ 101 (-28.87%)
Mutual labels: travis-ci, travis
googletest-ci
Continuous integration (CI) + Google Test (gtest) + CMake example boilerplate demo
Stars: ✭ 14 (-90.14%)
Mutual labels: travis-ci, travis
badge-matrix
More advanced badges for projects using Travis or Sauce Labs
Stars: ✭ 77 (-45.77%)
Mutual labels: travis-ci, travis
Generator Rn Toolbox
The React Native Generator to bootstrap your apps
Stars: ✭ 1,155 (+713.38%)
Mutual labels: travis-ci, travis
useForceUpdate
useForceUpdate
is a React Hook that forces your function component to
re-render.
useForceUpdate
does not serve a purpose in and of itself. It is a tiny
package that aims to be integrated into larger hooks, making obsolete any class
functionality that is still reliant on this.forceUpdate()
.
Install
-
npm install use-force-update
or yarn add use-force-update
Use
import React from 'react';
import useForceUpdate from 'use-force-update';
export default function MyButton() {
const forceUpdate = useForceUpdate();
const handleClick = React.useCallback(() => {
alert('I will re-render now.');
forceUpdate();
}, [forceUpdate]);
return (
<button onClick={handleClick}>
Re-render
</button>
);
};
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].