Are you calling this from a functional component or a class component? Where and when do you want to call the component (on mount, after a specific condition, etc.)?
<MyComponent> {someCondition ? uCyr() : notUCyr()} </MyComponent>
function MyComponent() { uCyr() return( <OtherComponent /> ) }
useEffect(() => { const subscription = props.source.subscribe(); return () => { // Clean up the subscription subscription.unsubscribe(); }; });
reactjs.org/docs/faq-functions.html
reactjs.org/docs/hooks-effect.html
Call from here import React from "react"; import "./styles.css"; import './Ucyr';
import { Ucyr } from './Ucyr';
export default function App() { return (
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Are you calling this from a functional component or a class component? Where and when do you want to call the component (on mount, after a specific condition, etc.)?
A very generic example of calling a function from JSX
A very generic example of calling a function before the return
A very generic example of calling a function in useEffect (from react docs)
Helpful links and further reading
reactjs.org/docs/faq-functions.html
reactjs.org/docs/hooks-effect.html
Call from here import React from "react";
import "./styles.css";
import './Ucyr';
import { Ucyr } from './Ucyr';
export default function App() {
return (
);
}