Can this react script be optimized? How to make it faster
Of course it never changes, because you told it that it never changes: // Selected page list const { initialSelectedPages, selectedPagesResolved} = useSelect( ( select) => { …. }, —–>[] <—– ); You declared the dependencies as an empty array, and empty arrays won’t change, so this hook won’t update when your attributes update because … Read more