Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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}
};
 
PREVIOUS NEXT
Tagged: #getstaticpaths #redux
ADD COMMENT
Topic
Name
1+4 =