client component
Unanswered
Air Penguin posted this in #help-forum
There are three components, A component, index, radio, A component explicitly defines use client, index and radio components do not specify use client, radio uses createContext. index imports and exports the radio component, and component A imports radio through index, which prompts createContext to be used only on the client side, but my A component has explicitly defined use client, and I am confused
8 Replies
confused about?
if you import something from a client component, the imported component becomes a client component
@Air Penguin
But why is the prompt that createContent must be used on the client,
Since the A component is the use client and introduces index, which in turn introduces radio, radio is the client component and using createContent should not prompt an error
@Arinji As you said, even if the use client is not defined, they will become client components because of the A component,
hmm
is index being used elsewhere?