Is there an easy way to initialize the data prop? #93
Replies: 1 comment 1 reply
-
I assume you're using the generator here. If you create a page manually, you should be able to get the page data out of the JSON database (or your own database, if you've switched it out) and pass it in to : const defaultData = {}; // Manually created using Puck
return <Client isEdit={isEdit} path={path} data={data || defaultData} />; Alternatively, you could put a console.log in your Hope that helps! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi again,
Is there an easy way to initialize the data property that is obtained from
getPage(path);
function and then passed to theRender
andPuck
components? Or do I have to build this view the puck editor (ironic that I would prefer the former haha)?It would be nice to be able to quickly design a basic/default version of the site for users to be able to use and also allow them to add/modify routes from the editor. The latter feature I am asking for seems to be part of the
getPage
function as far as I can tell, but I could be wrong.Thanks in advance,
Alex
Beta Was this translation helpful? Give feedback.
All reactions