Re: app development (using remix)

Solved

How to retrieve and display database data using Remix app development?

Minakshi15
Shopify Partner
148 6 13

How to retrieve data from the data base and displayed on different page 

getting this error while retrieving data and display on page https://prnt.sc/Gh45ej4iGkUP

If you find my reply helpful, please hit Like and Mark as Solution
Accepted Solutions (2)
Minakshi15
Shopify Partner
148 6 13

This is an accepted solution.

This is not a method issue method is already POST this is a variable(post) 

If you find my reply helpful, please hit Like and Mark as Solution

View solution in original post

Gordon_Chan
Shopify Partner
28 2 22

This is an accepted solution.

For a given route to render a page, you shall use "loader" function to retrieve data on server side, so then in the default function use "useLoaderData" for the data you got return from the loader function.

See if this YT video helps: https://www.youtube.com/watch?v=NXqEP_PsPNc&list=PLXoynULbYuEDG2wBFSZ66b85EIspy3fy6&index=2

http://gordon-chan.net
I am a Freelance Web Engineer. Dedicated my life to e-commerce development.

View solution in original post

Replies 3 (3)

yash_soni
Shopify Partner
4 0 0

hello Dear,

 

i think you have not create a post method. please check your route and change the method get to post or create a proper route.

 

Hope this helps!

Minakshi15
Shopify Partner
148 6 13

This is an accepted solution.

This is not a method issue method is already POST this is a variable(post) 

If you find my reply helpful, please hit Like and Mark as Solution

Gordon_Chan
Shopify Partner
28 2 22

This is an accepted solution.

For a given route to render a page, you shall use "loader" function to retrieve data on server side, so then in the default function use "useLoaderData" for the data you got return from the loader function.

See if this YT video helps: https://www.youtube.com/watch?v=NXqEP_PsPNc&list=PLXoynULbYuEDG2wBFSZ66b85EIspy3fy6&index=2

http://gordon-chan.net
I am a Freelance Web Engineer. Dedicated my life to e-commerce development.