Replies: 9 comments
-
Hey, thanks for your comments. I hadn't really planned to do that. I'd be happy to export a different "Viewer" component, but that would just be a wrapper around the main component with preset props. So I don't think that would help with bundle size at all, since I wouldn't be making a separate codebase for it (and don't really have any desire to, to be honest). |
Beta Was this translation helpful? Give feedback.
-
If you are looking for |
Beta Was this translation helpful? Give feedback.
-
I'll take a look, thanks. But is it as pretty as this one though? :) |
Beta Was this translation helpful? Give feedback.
-
The lib https://bundlephobia.com/package/[email protected] But I suppose the real test should be looking at the size of the lib after tree-shaking. |
Beta Was this translation helpful? Give feedback.
-
How about just a single <JsonEditor data={myData} viewer /> It wouldn't really help with the bundle size though, as it wouldn't be a separate code base, it would just be a shorthand for manually adding all the disable editing props. Just wondering if people would find that useful, or if they're happy to just include the disable editing props? |
Beta Was this translation helpful? Give feedback.
-
I think it's okay to leave it as is. I might fork the repo when I get a chance and experiment by ripping out the editing features and see how small we can get... |
Beta Was this translation helpful? Give feedback.
-
It would be great if you could share it here too |
Beta Was this translation helpful? Give feedback.
-
Just moving this to a discussion so you keep this idea alive. |
Beta Was this translation helpful? Give feedback.
-
I spent a little time last night looking into that. It's a major work in progress and not meant to be merged, it's purely for experimentation. I still have to get it working to import it into my project and then analyze how the Here was my process, being unfamiliar with the code base. I started from the
I hope to find more time later this week to keep working on it. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your work on this tool, it's a pretty JSON renderer.
I need a viewer, not an editor. I'm currently passing
restrict*
props tofalse
, which works. But I was wondering whether a viewer-only component (e.g.import { JsonViewer } from "json-edit-react";
) would help trim the size of my final bundle. Thoughts?Beta Was this translation helpful? Give feedback.
All reactions