File tree Expand file tree Collapse file tree 1 file changed +63
-56
lines changed
Expand file tree Collapse file tree 1 file changed +63
-56
lines changed Original file line number Diff line number Diff line change @@ -7,70 +7,77 @@ const useStore = create((set, get) => ({
77 edges : [ ] ,
88 viewport : { x : 0 , y : 0 , zoom : 0 } ,
99 needToRenderJson : {
10- property1 : "value1" ,
11- property2 : {
12- subProperty1 : "value2" ,
13- subProperty2 : [ 1 , 2 , 3 ] ,
14- } ,
15- property3 : [
10+ websiteName : "Shopify" ,
11+ categories : [
1612 {
17- name : "John" ,
18- age : 30 ,
19- } ,
20- {
21- name : "Jane" ,
22- age : 28 ,
23- } ,
24- ] ,
25- property4 : {
26- nestedProperty1 : {
27- nestedSubProperty : "value3" ,
28- nestedSubObject : {
29- subObjectProperty : "value5" ,
30- } ,
31- } ,
32- nestedProperty2 : "value4" ,
33- } ,
34- property5 : [
35- {
36- name : "Alice" ,
37- children : [
13+ id : 1 ,
14+ name : "Electronics" ,
15+ products : [
3816 {
39- name : "Bob" ,
40- children : [
17+ id : 101 ,
18+ name : "Smartphone" ,
19+ brand : "Apple" ,
20+ price : 999.99 ,
21+ reviews : [
4122 {
42- name : "Charlie" ,
43- children : [
44- {
45- name : "Dave" ,
46- children : [ ] ,
47- } ,
48- ] ,
23+ id : 1001 ,
24+ rating : 4.5 ,
25+ comment : "Great phone!"
4926 } ,
50- ] ,
27+ {
28+ id : 1002 ,
29+ rating : 5 ,
30+ comment : "Best smartphone ever!"
31+ }
32+ ]
5133 } ,
52- ] ,
34+ {
35+ id : 102 ,
36+ name : "Laptop" ,
37+ brand : "Dell" ,
38+ price : 1299.99 ,
39+ reviews : [
40+ {
41+ id : 1003 ,
42+ rating : 4 ,
43+ comment : "Good performance, but heavy."
44+ } ,
45+ {
46+ id : 1004 ,
47+ rating : 5 ,
48+ comment : "Excellent laptop for work."
49+ }
50+ ]
51+ }
52+ ]
5353 } ,
5454 {
55- name : "Eve" ,
56- children : [ ] ,
57- } ,
58- ] ,
59- property6 : {
60- level1 : {
61- level2 : {
62- level3 : {
63- level4 : {
64- level5 : {
65- level6 : {
66- level7 : "value6" ,
67- } ,
68- } ,
69- } ,
55+ id : 2 ,
56+ name : "Clothing" ,
57+ products : [
58+ {
59+ id : 201 ,
60+ name : "T-Shirt" ,
61+ brand : "Nike" ,
62+ price : 29.99 ,
63+ reviews : [ ]
7064 } ,
71- } ,
72- } ,
73- } ,
65+ {
66+ id : 202 ,
67+ name : "Jeans" ,
68+ brand : "Levi's" ,
69+ price : 59.99 ,
70+ reviews : [
71+ {
72+ id : 1005 ,
73+ rating : 4.5 ,
74+ comment : "Comfortable and stylish."
75+ }
76+ ]
77+ }
78+ ]
79+ }
80+ ]
7481 } ,
7582 onNodesChange : ( changes ) => {
7683 set ( { nodes : applyNodeChanges ( changes , get ( ) . nodes ) } ) ;
You can’t perform that action at this time.
0 commit comments