You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// function to determine server or client component (can look for 'use client' and 'hooks')
71
+
72
+
// also might want to consider functionality for child components of the current node to be classifed as client component (except for server clients rendered tree)
73
+
74
+
functioncheckForClientString(node){
75
+
if(node.type==='Directive'){
76
+
console.log('node',node);
77
+
78
+
// access the value property of the Directive node
79
+
console.log('Directive Value:',node.value);
80
+
81
+
// check if the node.value is a 'DirectiveLiteral' node
// clientNodes.map((nodeImport) => console.log('Names of Hooks', nodeImport.imported.name));
126
+
// console.log(clientNodes);
127
+
// // we'll wanna change this to use it somehow
128
+
// return clientNodes;
129
+
// }
130
+
returnfalse;
131
+
}
132
+
133
+
// function to determine if the client component imports server components or call server hooks/utils, if it does, then return 'is not valid client comp'
134
+
135
+
// function to determine if the component is server
136
+
137
+
// render component tree using react flow, passing in node and recursvely call on child nodes
0 commit comments