Answers for "getstaticpaths with redux"

1

getstaticpaths with redux

import store from '.../store';

export const getStaticPaths: GetStaticPaths = async () => {
  const state = store.getState();

  const paths = state.user.users.map((user) => {
    return (
      {params: {username: user.username}}
    );
  });

  return {paths, fallback: false}
};
Posted by: Guest on October-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language