This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Djordje Vanjek
Posted Nov 22 - Read on Facebook

I published my framer challenge prototype 🖐🏻✌🏻(7), at this one I wanted to play with the data from JSON file and it went very well.

But I have a few questions:
1. Why is this prototype laggy in framer studio, but when I publish it works super well?
2. Is there any simpler way to access to an active (current) page from page component? You'll see that I used `id` but that's definitely not a good way to go since id goes like (4;6;8;10...)

Thank you


Marc Krenn

First of all, I love the subtle background-transition using bg.animate! (you can get rid of the curly brackets though). :)

I think 'data.solarFacts[page.horizontalPageIndex(page.currentPage)]["photo"]' does what you're looking for. Also, there's no need to use a for-loop to the change the background image.

EDIT: 'page.currentPageIndex' should probably be a thing, Koen and co. ;)

Read the entire post on Facebook