Nano JSX does provide some useful lightweight build-in components.
You will find their
source code here and some examples on
how to use these component in the examples section.
Works just like react-helmet. Works client-side and SSR.
loading...
Lazy Loading Images. You should add a height and width if possible.
loading...
A isomorphic router is included.
loading...
Problem:
Solution:
You can use the Router Listener inside <Blog /> to listen for route changes.
This will allow you to fetch the new blog post (based on the new id in "/blog/:id") and update the
component.
(see example below and this video)
loading...
Use Suspense for async fetching resources from your server. Add cache
if you want
to cache the result of the promise.
Check
the examples to see it in action.
loading...
Nano JSX provides a fancy Link Component for prefetching pages.
loading...
This children of Visible will only be rendered and added to the dom, if they are visible. This is useful, for example, for a comment section. The root elements of Visible needs to be DOM element or a Fragment with at least one DOM node as direct child.
loading...