Questions tagged [hookstate]

5 questions
2
votes
0 answers

React - Loading images in conditional rendering - performance issue

I have a React application in which after clicking on the buttons I change the categories and each category has its own layout with text and images. The problem is that I conditionally render this layout using switch/case and every time the content…
1
vote
1 answer

HookState- Module '"@hookstate/core"' has no exported member 'useState'

I have 1 problem, normally it works fine, but today when I build, this error appears Module '"@hookstate/core"' has no exported member 'useState'. I use NextJS enter image description here I hope to get help. Thank you
1
vote
0 answers

How to make a react global state re-render component?

I have tried using two different libraries to handle this issue and both time I get the same behavior. Libraries tried: OvermindJS, Hookstate When I click the button I can see the state change is beeing logged in the console but the component will…
Mederic
  • 1,949
  • 4
  • 19
  • 36
1
vote
1 answer

react-datepicker Date error with hookstate and nextjs

Here's a page in nextjs: import type { NextPage } from "next"; import DatePicker from "react-datepicker"; import { useState as useStateHook } from "@hookstate/core"; import { useState as useStateReact } from "react"; const PageDate: NextPage = ()…
Lucas Steffen
  • 1,244
  • 2
  • 10
  • 22
0
votes
1 answer

how to type a dynamic ref with generics?

I want to be able to assign any html node to MutablerefObject. How is that done? export type Components = { [component_id: string]: MutableRefObject } const Overlay = () => { const ref = useRef(null) return