Comments (7)
Sorry for the late reply, yes, it requires installation in a React project. Flume is best used in projects with fairly diverse logic requirements so there's some inherent assumptions that developers who need it will previously understand the basics of React. create-react-app
is a great place to get started as you have. It looks like the error you're running into above is because your config.js
file is not available relative to your App.js
file. In the folder structure of your React project, your config.js file should be like this:
/src
├─ App.js
├─ config.js
However, keep in mind that this is only required for this specific example. You can create and store your configuration anywhere you like in your project, and then import and pass it to the NodeEditor
component.
from flume.
I found the issue, on the config.js it needs export { config };
at the end
and on App.js import { config } from "./config";
to read it.
I think it would be nice to be included in the documentation. But I get that is something very basic and trivial.
from flume.
Hey @netgfx, thanks for trying out Flume! The quick start guide can help you get started with a basic setup, it's available here: Flume Quick Start
I'm in the process of working on a contributors guide which will have instructions for using the example directory. Is there a specific problem you're having trying to get started?
from flume.
Thanks for the quick response. From the link that you shared along with other documentation I take it that flume requires a basic npm setup and the reactjs to be installed. Is anything else required?
I know it may sound very beginner like, but I believe it would be helpful if the guide assumed that all I had was an empty folder, what steps would I need to take to have the most basic functionality of flume and view that locally in my browser.
from flume.
@chrisjpatty So what I did was to install the default react project via npx create-react-app my-app
then do npm install flume
then create the config.js file as described here: https://flume.dev/docs/basic-config
and change the default App.js
like this:
import React from 'react';
import logo from './logo.svg';
import './App.css';
import { NodeEditor } from 'flume'
import config from './config'
function App() {
return (
<div style={{width: 800, height: 600}}>
<NodeEditor
portTypes={config.portTypes}
nodeTypes={config.nodeTypes}
/>
</div>
);
}
export default App;
and then run npm start
which opened the a browser tab and threw the following error:
./src/App.js
Attempted import error: './config' does not contain a default export (imported as 'config').
from flume.
@chrisjpatty App.js is on the same src
folder as config.js
this is why the error I'm getting seems to weird to me. Is the npm start
the right command? Again this is the default react project that gets automatically created with npx create-react-app my-app
.
What else is required to run the basic Flume example?
from flume.
Can you put your code on a public repository and share the link here? I'm having trouble visualizing how you have your code setup.
from flume.
Related Issues (20)
- is this project still in development? HOT 1
- [Question] Vanilla JS usage ? HOT 2
- Type 'string' is not comparable to type 'NodeType' HOT 2
- Support for "any" datatype on ports
- Saving/loading of paths HOT 1
- I can't add nodetypes dynamic
- Clone of version v0.8.2 but version compatibility problem on installation HOT 1
- Bug: Cannot read properties of null (reading 'setAttribute')
- Connecting nodes to already connected input?
- Branching logic
- Getting and setting pan and zoom HOT 1
- Theming documentation missing closing backtick
- Animated connections
- How to actually extract context?
- Rendering custom components in nodes
- Flume for NEXT.js v14 HOT 3
- Support mobile? (ipad)
- Well done! HOT 1
- Inquiry on Project Maintenance Status for Flume HOT 3
- Custom node connectors
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 flume.