Search
subscribeToCustomCode
subscribeToCustomCode
Subscribe to custom code changes.
function useCustomCode() { const [customCode, setCustomCode] = useState<CustomCode | null>(null) useEffect(() => framer.subscribeToCustomCode(setCustomCode), []) return customCode }
Called when custom code is registered or when changes to the settings are made.
Parameters
callback:(customHTML: CustomCode) => void– Called when custom code settings change.
Returns
Unsubscribe– A function to unsubscribe from updates.