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
{{ message }}
Repository navigation
Exporting TRenderEngineContext to allow plugging in rendering engine cache #11
Saw this project was in the middle of being ported from react-native-render-html in a great big open PR so didn't want to interfere with that process by proposing changes while you're in the middle of the big move, so please take this mainly as a question for now!
Is there a good reason this context isn't exported so you can customise the rendering engine provider behaviour? I've got it locally patched to allow that and it seems to be fine but I'm wondering if I've missed something because so many other things are exported that this almost stands out as a deliberate exclusion.
My use case is, loads of small HTML snippets on one page so want to reuse engines for speed, but the snippets can't all share the same single engine from one parent as they're not all styled the same - and some can be styled dynamically according to user actions. But they're always styled almost the same and there are only a few variations, so by exporting this context I've been able to add a small cache of reusable engines keyed on the styles to be applied, and a hook to pull the right engine from the cache for a given snippet - much faster rendering with many heterogenously-styled snippets on one page.
If there's no reason I've missed why this export is specifically undesirable, would you accept a PR for it at some convenient point - and if so, any preferred target branch/conventions you have in mind for this new ported project?
@ehenighan I see no harm in exporting it! Happy to review a PR on this. Note that recently I haven't been able to commit to this project, unfortunately. I hope I will be able later this year.
Great, I'll sling one in when I get a bit of time spare then. Any preference on target branch at the moment given the open mega PR? I can always just wait until it's merged - not urgent!
Activity
jsamr commentedon Apr 17, 2025
@ehenighan I see no harm in exporting it! Happy to review a PR on this. Note that recently I haven't been able to commit to this project, unfortunately. I hope I will be able later this year.
ehenighan commentedon Apr 24, 2025
Great, I'll sling one in when I get a bit of time spare then. Any preference on target branch at the moment given the open mega PR? I can always just wait until it's merged - not urgent!