Comments (5)
Yea. This is predicated on the fact that if you implement IComponentForge
someone needs to forge
you before they attach you. I had a pr https://github.com/microsoft/Prague/pull/2993 to push the forging logic into the runtime but it got some push back and I haven't got back around to looking at it.
Overall there's a question of:
What happens if you are creating a component that requires some props as part of creation?
Options that I've considered:
-
instantiateComponent
takes a props somehow (passed in via IComponentContext or an additional property). This is similar to how we pass theisExisting
flag currently. ourcreateComponent(id, pkg, props?)
and the props would be passed into the instantiateComponent call. The developer would then need to know to look for those props and pass them into their constructor or initialize step appropriately. -
instead of just having an
instantiateComponent
call we could have two.instantiateComponent
andcreateComponent
that the developer has to implement and we call them depending on if it's the first time or not. I don't like this because I feel like it's a lot of extra work on the developer. -
We have a pattern where the caller is required to call
forge(props)
after creation. This is what we went with but since there is not compile time break it's easy to mess up. If we want to continue with this path we should make it part of the runtime.
I like 1 & 3 and have been leaning back and forth.
from fluidframework.
I'd recommend option 1. You'll then no longer need the IComponentForge interface.
from fluidframework.
@DLehenbauer , yea I agree.
from fluidframework.
@skylerjokiel is this still relevant since forge was removed?
from fluidframework.
This issue is resolved now.
from fluidframework.
Related Issues (20)
- Unexpected behavior for SharedString.findTile when searching at beginning/end of string HOT 5
- Support upload of any binary content of the blob during the initial summary upload at routerlicious driver. HOT 6
- Move to semver >= 7.5.2
- ActivityTimeout event handling behavior not consistent in Deli HOT 2
- Deprecate mergeTree's findTile method HOT 1
- 6.1 release blocker: Add removed telemetry items HOT 1
- Remove type parameter from IntervalCollection's add method HOT 1
- Shredded summary upload service fails on compressed binary summary blobs. HOT 3
- Copy of the container with compressed binary summaries is failing. HOT 6
- Memory leak related to unbounded creation of debug loggers HOT 1
- Stop requiring guestDisplayName as pre-condition for requestSocketToken: true as part of joinSession payload HOT 2
- Browser - Database updates on a separate thread HOT 2
- SharedMatrix undefined cell values HOT 8
- Need to bump axios to 1.6.0+ (and test) to address vulnerability HOT 7
- Misbehaving driver can cause Fluid to hang on container open HOT 7
- Allow SharedTree to be passed across iframe boundary HOT 3
- Blazor SDK HOT 1
- Use @fluidframework/azure-client can not create container and get Error: 0x883 at app.js:125 HOT 3
- Intervals not at expected location sometimes after undo-ing HOT 3
- Issue at container connection : Provided user was not an "AzureUser" HOT 1
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 fluidframework.