Comments (4)
I solved this in my local version by adding a debounce timer within editor.tsx and used it for updating the title and description fields:
Is this a valid approach to fixing this, or would it be better to somehow get the debounce timer included in the NovelEditor instead of creating another one?
EDIT: I see now this is definitely not a valid approach since it causes an infinite loop, I will continue trying to fix.
from platforms.
So actually, it looks like the infinite loop might be occurring on the main demo site as well
Is this happening for anyone else?
from platforms.
So after a little bit more investigation it looks like there's an issue with this useEffect in the nav.tsx. Commenting it out seemed to fix the infinite loop but I'm not really proficient enough to understand what the useEffect was doing.
from platforms.
Thank you! I commented out the entire post/[id] page and it was still happening and I was thoroughly puzzled.
Edit: the quickest fix without changing any functionality is to change the dependency array:
useEffect(() => {
console.log("segments", segments);
if (segments[0] === "post" && id) {
getSiteFromPostId(id).then((id) => {
setSiteId(id);
});
}
}, [segments[0], id]);
Notice how I'm using segments[0]
instead of segments
because segments is an array (object) which gets returned from useSelectedLayoutSegments
and thus the useEffect is running indefinitely because it's always a new object, even if the contents in it is the same.
from platforms.
Related Issues (20)
- sub.domain.com/slug 500 error HOT 1
- Turn off dark mode HOT 1
- server actions redirect issue HOT 2
- After login I am redirected to login page even though my callback url is set to the app domain HOT 4
- npx create-next-app --example https://github.com/vercel/platforms platforms No longer works HOT 2
- Github login not working for some users using new DrizzleORM setup HOT 2
- Run starter kit at subdomain and use apex domain for homepage
- Code deployment build error - no env variable found HOT 1
- Dynamic PWA for each subdomain/tenant HOT 1
- 500 | Internal Server Error on blog posts HOT 3
- Update docs to reflect changed orm
- Adding support for custom css per domain? HOT 2
- 404 error on all three sites with custom domains applied HOT 4
- How does redirect preserve the subdomain when printing req.url doesn't show the subdomain
- Local database, or other database other than vercel HOT 1
- example redirect to `${ROOT_DOMAIN}/login` to `app.${ROOT_DOMAIN}/login`
- https://next-auth.js.org/errors#oauth_callback_handler_error Cannot set property error of HOT 3
- Server actions are run but only return undefined on the client HOT 2
- @tanstack/[email protected]. npm ERR!
- DNS_PROBE_FINISHED_NXDOMAIN for subdomains (sites)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from platforms.