Comments (3)
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.
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
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 runningx0 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.
Done in #77.
from react.
Related Issues (20)
- Consider modern `moduleResolution` HOT 1
- Data Table Pagination - when the page numbers in the 1000s the page numbers are unreadable HOT 1
- Dockerize The entire application HOT 1
- [ActionMenu.Button] onClick doesn't function HOT 9
- "npm run setup" doesn't exist in your package.json HOT 1
- Inline `ActionList.Description` can result in horizontal overflow HOT 2
- <UnderlineNav.Item /> without counter shows loading indicator HOT 2
- Release Tracking
- `<AnchoredOverlay>` needs to be upgraded to `popover`
- Roll out tooltip in our primer/react components that uses IconButton under the hood
- test
- Release Tracking
- containsCurrentItem State Not Reset in NavList Component. HOT 1
- SelectPanel bug when we have static items list is inside same component
- Tooltip is misplaced when it is rendered on a dialog
- Add support for `className` to `<AnchoredOverlay>` HOT 3
- Release Tracking
- Dialog: Support a responsive value for `isOpen` HOT 1
- Confusion between Dialog and DialogV1
- Proposal: Keybinding hints in tooltips / icon buttons HOT 3
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 react.