React native: horizontal swipe-scene pagination with dynamic loading - react-native

I want to implement horizontal swipe-scene-pagination in react-native app. I need it to have only 3 pages rendered at any moment (current, previous and next) and i want to add new pages dynamically on page change.
I bet there are implementation for that is already done by someone, but i haven't found any.
Also, as far as i remember, this kind of questions are not allowed in stackoverflow. Could you, please, point to the stack-exchange site where i can ask this question?

Related

How do I display a page at a specific section in .NET Core MVC?

Sorry if this is a stupid question or has been asked before, but I've been looking for an hour and haven't found any answers.
I'm working on a .NET Core MVC web application, and one of the views has subsections that I want to be able to go to directly, without having to have already loaded the view.
If the view is loaded, then href="viewname.html#sectionID" works, but it won't work if I am currently on another view. It also confuses me that my view files are .cshtml, and not plain HTML files, and it still recognizes which section of the view it needs to go to...
I tried using the Anchor Tag Helper and I couldn't figure out how I would do it with that.
Any help is greatly appreciated.
I got it to work the way I wanted it by mix and matching href="ViewName#sectionID" for when I want to go to a specific section in the view, using href only calls for all views except the homepage one and asp-action="ViewName" for the homepage view(index). Also, I defined the routes for the controller actions for every action other than the homepage. This way, the URL is basically always myURL.com/ViewName/, and on the homepage it's just myURL.com/, so an href that specifies the URL will lead to the desired controller action.
This is pretty basic, and it was just my lack of understanding towards how routing worked, but maybe someone else runs into this and finds this answer useful... I do feel pretty dumb though.

Nested Routes in Gridsome?

In Gridsome, I am basically looking for Vue's nested route functionality (or Nuxt's child-view) to achieve something like this /:userId/profile and /:userId/posts for example. And since Gridsome uses Vue Router there should be a way to achieve this I believe
Let me try to explain what I am trying to build with Gridsome:
At mywebsite.com/ I want to show a Grid of images showing thumbnails of my video portfolio. When you then click on a thumbnail I want a modal to pop-up showing the video. The modal is semi transparent showing the portfolio in the background. So far so good.
But for people to be able to share the URL of the respective video, I need the path changing to mywebsite.com/video-1 and so on. When I then close the modal the path should be mywebsite.com/ again. This is something I already achieved within Nuxt with <child-view>.
Is there some similar functionality in Gridsome? I appreciate your help.
From the feedback you got here:
Gridsome doesn't support child routes yet. But you can kind of achieve what you want if you create a new content type called User and add each user as a node. Then generate pages for them with the Pages API. The pages you create can share a layout component.
In the same way, you can also generate pages for each video for having direct URLs to them. And use the $fetch() method to load a video in a pop-up. Or just query the videos in the front-page query instead of using $fetch().

How can I use a Shopify app proxy within a product page? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 10 months ago.
Improve this question
Essentially we want on our Shopify product pages to show a button to a logged-in customer. That button would use our app to then call an external API.
I'd like to use an app proxy, but it appears we cannot do an app proxy on a product page, but we could technically call an app proxy on a product page via an Ajax call. We could inject the button into the page, but we need that button to still make a call to the app.
Guess we could load the button in an iframe?
Would anyone know of a best practice on how to do this? Thanks!
Here is the recipe I use, which works perfect and seems to answer your use case.
On a product page, you know if a customer is logged in or not, using Liquid. Therefore you can render a button where you want, and ensure there is Javascript to handle button clicks. Since you are rendering a button and Javascript, it makes sense that you can also do callbacks to your App Proxy. Perhaps a button click sends the Proxy the customer ID, your API calls look up the customer, and you birth a Unicorn for them. Your App Proxy returns Liquid or just JSON, so the callback can render HTML for you or turn the JSON into something for the customer.
Works great for me. Try it. You might like it.

How do I organize a sign in page for a react-native app?

I'm super new to react-native and I had more of a general question. I hope this isn't in the wrong spot.
Let's say I have a sign-in screen for my app.
I created a SignInScreen.js file. Now in this file, I have a couple of options:
I could just render out two text fields (for email and password)
or
I could create a separate SignIn component. I would render that in the SignInScreen and then in the SignIn component, I would render the two text fields for email and password.
I'm not sure what is considered best practices. Am I over-thinking this? Would I be over engineering if I created the separate SignIn component?
Thanks so much.
I think this is a personal question and you are going to get mixed answers.
I would think long term. Are you going to make this only for this app? Or are you planning on re using that? If the first one, then just add the TextInput and that's it.
If you think that you might re use the code in other apps you could create a SignIn component like you said and create a module to import.
But if you are very new to RN don't complicate yourself right now.

Vue router for multiple navigations

I am using vuejs router as frontend for my app which is getting deeper and deeper day by day. Now my client has asked me to create a new section for my site which basically is a complete website in its nature. hence will have a different navigation. Now my question is how do i make it happen.
one solution is to use a variable or something to hide the main navigation and show this sub-navigation bar. This doesn't feel neat to me.
'
I open to any suggestions.