Coder Social home page Coder Social logo

Kit updates about react HOT 3 CLOSED

emplums avatar emplums commented on April 25, 2024
Kit updates

from react.

Comments (3)

emplums avatar emplums commented on April 25, 2024 2

Update!

I've merged in @broccolini 's changes in #72 and using the _app.js file + importing the Index component from docs.js seems to have fixed all our issues regarding reloading! 🎉 🎉 🎉

Going to work on getting permalinks working next!

from react.

emplums avatar emplums commented on April 25, 2024

Update on this for the team! @primer/ds-core

TLDR; I've got HMR mostly running, the fix was to rename the index.js file in /examples to something besides index, but that creates another issue with the base page that loads up when x0 is started being an unstyled page just showing all the files in /examples. Permalinks still aren't working ☚ī¸ It's been a bit difficult understanding whether these issues are x0 issues, issues with me adding react-router to the mix, or issues with GitHub pages. I've been running into a bit of friction with the documentation on x0 + Kit being a little sparse since they are relatively new projects. I've messaged Jackson again and am going to keep digging today!

Update

I got HMR working again by renaming the index in the examples folder to something else, then changing x0 config's basename to '/', but I'm running into a few issues!

  • When running x0 dev examples -op 8888 , I get taken to an unstyled index page listing all the files in my examples folder, since I don't have an index in that folder anymore. If I try running x0 dev examples/docs.js -op 8888 instead, the first load brings me to the examples/docs.js like I'd like it to, but when HMR kicks in after a change, it brings me back to the unstyled page listing the files in examples/docs.js. The URL in the browser is correct though (ex. [http://localhost:8888/docs/primer-react/Box] [name of index file/name of library/name of example]).

  • I did set up a in my examples/docs.js file (previously examples/index.js) and I'm curious if that might be causing the issue here? Jackson mentioned that x0 already has routing set up, but it looks like that's just for routing in between Example components in a Library, I'm assuming that wouldn't work out of the box for just simple routing between components from the index page (ex. I have a Demos Library, Components Library, and Sandbox I'd like to add to the top navigation)

  • I also had to set the basename config for x0 to / in order to get the docs to build, not sure if that is having something to do with it?

  • When we publish our static builds to GitHub Pages, navigation works around Kit, but if I copy the link and paste it in a different tab, I get a 404. Honestly not sure if this is a x0 issue or a GitHub Pages issue

from react.

shawnbot avatar shawnbot commented on April 25, 2024

Done in #77.

from react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.