Comments (5)
And is there a way to directly display primitive types? Like, strings, numbers, boolean.
For example
'hello world'
new Date()
true
Symbol.iterator
from react-object-view.
I found that the Error object was rendered as a valid URL, but React does not allow direct rendering of Error objects, resulting in an exception being thrown.
from react-object-view.
Moreover, strings in the form of 'foo: bar'
are rendered as hyperlinks.
from react-object-view.
Hi, @pansong291!
Can you provide a way to reproduce this case, it might be something specific, because error objects seem to render fine. Also, have you tried the demo? https://monojack.github.io/react-object-view/
You can edit the input to see how everything is displayed
{
err: new Error('unknow'),
string: 'hello world',
date: new Date(),
bool: true,
iterator: Symbol.iterator
}
As for the foo:bar
rendering as a hyperlink, I will push a quick fix in a few minutes
from react-object-view.
Hello, @monojack !
I have already tried the online examples and pasted the JavaScript Object you provided into the Data input box, but an exception occurred as shown in the image below.
Details: https://react.dev/errors/31?invariant=31&args%5B%5D=Error%3A%20unknow&args%5B%5D=
Then, this project is rendered based on Object, and the provided data
must be an object. Can it support direct rendering of other types? For example, I want to directly provide a string without putting it into an object first. The following image showcases the appearance of directly rendering a string and an array.
from react-object-view.
Related Issues (2)
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-object-view.