arez / arez-persist

https://arez.github.io/persist
Apache License 2.0
2 stars 0 forks source link

PersistType needs to be added to @ArezComponent type which is difficult in react4j #4

Open realityforge opened 4 years ago

realityforge commented 4 years ago

ArezPersist triggers the processing of a type when @PersistType is present on a type but it also checks to see whether the component has the @ArezComponent annotation and only generates the sidecar when that is present. (ArezPersist allows @Persist annotations on types annotated with @ActAsComponent but will generate errors in other circumstances but should not generate sidecars for @ActAsComponent types).

This does not work when another framework (like react4j) is responsible for creating the @ArezComponent type. We should figure out a way to have arbitrary frameworks allow and copy down annotations from other frameworks. i.e. Copy @PersistType on @ReactComponent annotated types to generated @ArezComponent and allow @Persist annotation to be present on @ReactComponent annotated types.

realityforge commented 4 years ago

See arez/arez#112 for issue to track it across arez ecosystem