xyflow / web

📖 This monorepo contains the xyflow website and the documentation sites for React Flow and Svelte Flow.
https://xyflow.com
MIT License
30 stars 36 forks source link

CustomNode on NextJS with Tailwind doesn't seem to work #370

Closed latifs closed 2 months ago

latifs commented 2 months ago

Hey Guys, I'm trying to use the example customNode with Tailwind here in my nextJS app. It doesn't seem to be working though (no changes on the way the nodes look).

I've basically used the example customNode in the link and added to my tailwind.config.js.

important: true

and added the required:

import CustomNode from './CustomNode';
const nodeTypes = {
  customNode: CustomNode
};
....

<ReactFlow
  nodes={nodes}
  edges={edges}
  onConnect={onConnect}
  onInit={() => onLayout('LR')}
  onNodesChange={onNodesChange}
  onEdgesChange={onEdgesChange}
  nodeTypes={nodeTypes}
>
  <Controls />
</ReactFlow>

Not sure If I need anything else to make it work: I've also cleaned up my nextJS cache:

rm -rf .next
npm run dev

I'm on

"reactflow": "^11.10.4",
"next": "14.1.0",

Anything to put me in the right direction would be amazing! Thanks guys!