Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
usestep-storage-ts
Advanced tools
Readme
Este é um hook personalizado feito com TypeScript para aplicações ReactJS e NextJS que permite salvar o passo ou (step) atual de um formulário mesmo quando o navegador é fechado ou recarregado.
Você pode instalar este pacote com o seguinte comando:
npm install usestep-storage-ts
ou
yarn add usestep-storage-ts
Você pode usar este hook da seguinte maneira:
import useStep from 'usestep-storage-ts'
export default function MyComponent() {
const [step, setStep] = useStep('key', 0)
return (
// restante do projeto
)
}
O primeiro argumento é a chave (string) que será usada para salvar o passo ou (step) no localStorage do navegador. O segundo argumento é o valor padrão caso não haja nenhum valor salvo anteriormente.
Se você deseja contribuir para este pacote, por favor, abra uma issue ou envie uma pull request. Todas as contribuições são bem-vindas!
Certifique-se de atualizar os testes conforme apropriado.
Este pacote está sob a licença MIT. Veja o arquivo MIT para mais informações.
FAQs
This hook can be used to control each step of a form that was made with the idea of showing each step in the necessary time, thus helping to further componentize a form in react. The Hook stores the state in localstorage and even with the page update it r
The npm package usestep-storage-ts receives a total of 0 weekly downloads. As such, usestep-storage-ts popularity was classified as not popular.
We found that usestep-storage-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.